Re: [GENERAL] OFFSET and LIMIT - performance

2007-06-29 Thread Kaloyan Iliev
And what about using cursors and move. Which is faster - OFFSET/LIMIT OR CURSOR/MOVE. Best Regards, Kaloyan Iliev Tom Lane wrote: "Jan Bilek" <[EMAIL PROTECTED]> writes: I'm using PGDB with JDBC. In my app i need to select only portion of all = available rows. I know i can do it two wa

Re: [GENERAL] OFFSET and LIMIT - performance

2007-06-29 Thread Simon Riggs
On Thu, 2007-06-28 at 11:36 -0700, David Wall wrote: > > Network transmission costs alone would make the second way a loser. > > > > Large OFFSETs are pretty inefficient because the backend generates and > > discards the rows internally ... but at least it never converts them to > > external form o

Re: [GENERAL] OFFSET and LIMIT - performance

2007-06-28 Thread David Wall
Network transmission costs alone would make the second way a loser. Large OFFSETs are pretty inefficient because the backend generates and discards the rows internally ... but at least it never converts them to external form or ships them to the client. Rows beyond the LIMIT are not generated

Re: [GENERAL] OFFSET and LIMIT - performance

2007-06-28 Thread Tom Lane
"Jan Bilek" <[EMAIL PROTECTED]> writes: > I'm using PGDB with JDBC. In my app i need to select only portion of all = > available rows. I know i can do it two ways: > 1. I can use OFFSET and LIMIT SQL statements or > 2. I can select all rows and then filter requested portion in Java. > My question

[GENERAL] OFFSET and LIMIT - performance

2007-06-28 Thread Jan Bilek
Hello, I'm using PGDB with JDBC. In my app i need to select only portion of all available rows. I know i can do it two ways: 1. I can use OFFSET and LIMIT SQL statements or 2. I can select all rows and then filter requested portion in Java. My question - Does the second way significantly affect p