Re: [GENERAL] Counting all results before LIMIT

2012-10-05 Thread Edson Richter
Em 05/10/2012 12:17, Mike Christensen escreveu: You could use a windowing function. Something like: SELECT x, y, z, COUNT(*) OVER() FROM Foo LIMIT 50; Good to know! I'll give a try! On Fri, Oct 5, 2012 at 8:02 AM, P Gouv > wrote: You cant. There is an article

Re: [GENERAL] Counting all results before LIMIT

2012-10-05 Thread Mike Christensen
You could use a windowing function. Something like: SELECT x, y, z, COUNT(*) OVER() FROM Foo LIMIT 50; On Fri, Oct 5, 2012 at 8:02 AM, P Gouv wrote: > You cant. There is an article about count performance. Generally its slow > but latest version 9.2 i think supports index for count under some

Re: [GENERAL] Counting all results before LIMIT

2012-10-05 Thread P Gouv
You cant. There is an article about count performance. Generally its slow but latest version 9.2 i think supports index for count under some condition.But 300 isnt that much that you should worry.Another modern solution is to not count results just add one more at limit to see if there is next page