On Wed, Feb 1, 2012 at 12:48 PM, Alessandro Gagliardi <alessandro@xxxxxxxx> wrote: > LIMIT 65536; Total query runtime: 14846 ms. > - http://explain.depesz.com/s/I3E > LIMIT 69632: Total query runtime: 80141 ms. > - http://explain.depesz.com/s/9hp > > So it looks like when the limit crosses a certain threshold (somewhere north > of 2^16), Postgres decides to do a Seq Scan instead of an Index Scan. > I've already lowered random_page_cost to 2. Maybe I should lower it to 1.5? > Actually 60K should be plenty for my purposes anyway. also, is effective_cache_size set to a reasonable value? merlin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance