Re: Regarding Sequential Scans count increase each time we press refresh .

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

 



Robert Haas <robertmhaas@xxxxxxxxx> writes:
> On Thu, Sep 24, 2009 at 8:25 PM, Josh Berkus <josh@xxxxxxxxxxxx> wrote:
>> You can't "turn off" sequential scans.  You can only make the planner
>> less likely to choose them.  But if there's no way to get the data you
>> need other than a seqscan, it's still going to do one.

> And that's not a bad thing.  For a very small table, it's often the
> fastest method.

Probably more to the point: if the query involves fetching the whole
table, it's *always* the fastest method.  (Except maybe if you want
the results sorted, and often it's the fastest way even so.)  Indexes
are not a panacea.

			regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux