Search Postgresql Archives

Re: query planner weirdness?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Bob Duffey" <bobduffey68@xxxxxxxxx> writes:
> I'm seeing some query plans that I'm not expecting.  The table in question
> is reasonably big (130,000,000 rows).  The table has a primary key, indexed
> by one field ("ID", of type bigint).  Thus, I would expect the following
> query to simply scan through the table using the primary key:

> select * from "T" order by "ID"

This is not wrong, or at least not obviously wrong.  A full-table
indexscan is often slower than seqscan-and-sort.  If the particular
case is wrong for you, you need to look at adjusting the planner's
cost parameters to match your environment.  But you didn't provide any
evidence that the chosen plan is actually worse than the alternative ...

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux