Re: [SQL] LIMIT question

2008-08-19 Thread Tom Lane
"Richard Broersma" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote: >> Is there a better way to accomplish this goal? > Here is a nice discussion on the alternatives open to you: > http://www.commandprompt.com/blogs/joshua_drake/2007/08/how_many_rows_do_i_have_anyway/ That doesn't really

Re: [SQL] LIMIT question

2008-08-19 Thread Richard Broersma
On Tue, Aug 19, 2008 at 1:58 PM, EXT-Rothermel, Peter M <[EMAIL PROTECTED]> wrote: > Now I can give some feedback like your search matches 200,000 but was > limited to 1000 items. > Is there a better way to accomplish this goal? Here is a nice discussion on the alternatives open to you: http://www

[SQL] LIMIT question

2008-08-19 Thread EXT-Rothermel, Peter M
I need to use a LIMIT count in a query but I also need to know how many rows the query itself would yield without the limit. I can do this inside a transaction like this BEGIN SELECT COUNT(*) from table1 where blah; select * from table1 where blah LIMIT 1000; COMMIT Now I can give some feedback l