Re: [GENERAL] limit-offset different result sets with same query

2009-05-11 Thread Emanuel Calvo Franco
2009/5/9 Tom Lane : > Merlin Moncure writes: >> On Fri, May 8, 2009 at 5:40 PM, Alvaro Herrera >> wrote: >>> Yeah, we went over this on the spanish list, turned out that I couldn't >>> remember about syncscan :-) > >> I like the new behavior.  It really encourages proper use of order by, >> becau

Re: [GENERAL] limit-offset different result sets with same query

2009-05-10 Thread Scott Marlowe
On Sun, May 10, 2009 at 2:03 AM, David Fetter wrote: > On Sat, May 09, 2009 at 01:28:03PM -0400, Tom Lane wrote: >> Merlin Moncure writes: >> > On Fri, May 8, 2009 at 5:40 PM, Alvaro Herrera >> > wrote: >> >> Yeah, we went over this on the spanish list, turned out that I >> >> couldn't remember

Re: [GENERAL] limit-offset different result sets with same query

2009-05-10 Thread David Fetter
On Sat, May 09, 2009 at 01:28:03PM -0400, Tom Lane wrote: > Merlin Moncure writes: > > On Fri, May 8, 2009 at 5:40 PM, Alvaro Herrera > > wrote: > >> Yeah, we went over this on the spanish list, turned out that I > >> couldn't remember about syncscan :-) > > > I like the new behavior. It really

Re: [GENERAL] limit-offset different result sets with same query

2009-05-09 Thread Tom Lane
Merlin Moncure writes: > On Fri, May 8, 2009 at 5:40 PM, Alvaro Herrera > wrote: >> Yeah, we went over this on the spanish list, turned out that I couldn't >> remember about syncscan :-) > I like the new behavior. It really encourages proper use of order by, > because the natural ordering resul

Re: [GENERAL] limit-offset different result sets with same query

2009-05-09 Thread Merlin Moncure
On Fri, May 8, 2009 at 5:40 PM, Alvaro Herrera wrote: > David Fetter escribió: >> On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: >> > Hi all. >> > >> > I'll make this faster. >> > >> > I hace this table and this function: >> >> You should only ever assume that your SELECT's

Re: [GENERAL] limit-offset different result sets with same query

2009-05-09 Thread Emanuel Calvo Franco
2009/5/8 David Fetter : > On Fri, May 08, 2009 at 06:40:33PM -0300, Emanuel Calvo Franco wrote: >> >> I test it in the first time :) >> >> With the 'order by' it works well, but in 'theory' > > The theory under which you should operate is that the underlying > implementation only gives you the orde

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread David Fetter
On Fri, May 08, 2009 at 06:40:33PM -0300, Emanuel Calvo Franco wrote: > 2009/5/8 David Fetter : > > On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: > >> Hi all. > >> > >> I'll make this faster. > >> > >> I hace this table and this function: > > > > You should only ever assume

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Adam Rich
Emanuel Calvo Franco wrote: > > Executing 'select * from datos limit 1 offset 15' two times i have different > result sets. > When i execute 'explain analyze verbose ' i see that (as > expected) the seq scan > is occurring. > > > That's correct? Is logical that if the scan is sequential in

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Alvaro Herrera
David Fetter escribió: > On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: > > Hi all. > > > > I'll make this faster. > > > > I hace this table and this function: > > You should only ever assume that your SELECT's output will have a > particular ordering when you include an O

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Emanuel Calvo Franco
2009/5/8 David Fetter : > On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: >> Hi all. >> >> I'll make this faster. >> >> I hace this table and this function: > > You should only ever assume that your SELECT's output will have a > particular ordering when you include an ORDER BY

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread David Fetter
On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: > Hi all. > > I'll make this faster. > > I hace this table and this function: You should only ever assume that your SELECT's output will have a particular ordering when you include an ORDER BY clause that actually specifies th

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Emanuel Calvo Franco
2009/5/8 Tom Lane : > Emanuel Calvo Franco writes: >> Executing 'select * from datos limit 1 offset 15' two times i have >> different >> result sets. > > The "synchronous scan" logic is probably responsible.  Turn off > synchronize_seqscans if this behavior bothers you. > >                  

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Tom Lane
Emanuel Calvo Franco writes: > Executing 'select * from datos limit 1 offset 15' two times i have > different > result sets. The "synchronous scan" logic is probably responsible. Turn off synchronize_seqscans if this behavior bothers you. regards, tom lane -- Sent