| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, keshav upadhyaya <ukeshav2009(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Regarding Sequential Scans count increase each time we press refresh . |
| Date: | 2009-09-27 19:17:13 |
| Message-ID: | 7885.1254079033@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice pgsql-performance |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Sep 24, 2009 at 8:25 PM, Josh Berkus <josh(at)agliodbs(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2009-09-28 02:23:52 | Re: Databse installation problem |
| Previous Message | Robert Haas | 2009-09-27 18:38:06 | Re: Regarding Sequential Scans count increase each time we press refresh . |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | std pik | 2009-09-28 06:13:40 | Postgres performance |
| Previous Message | Robert Haas | 2009-09-27 18:45:26 | Re: Slow query after upgrade to 8.4 |