Can anyone explain the following odd behavior?
I have a query that completes in about 90 ms. If I append LIMIT to the
very end, eg. "LIMIT 500" the evaluation time increases to about 800 ms.
How can performance get *worse* by giving the database the option to
stop the evaluation earlier (when it reaches the output 500 rows)?
I have pasted both queries together with output from explain analyze here:
pgsql-performance by date
|Next:||From: Matthew||Date: 2007-11-30 13:30:28|
|Subject: Re: Appending "LIMIT" to query drastically decreases
|Previous:||From: Csaba Nagy||Date: 2007-11-30 10:29:43|
|Subject: Re: TB-sized databases|