From: | Francisco Reyes <lists(at)natserv(dot)com> |
---|---|
To: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
Cc: | Francisco Reyes <lists(at)natserv(dot)com>, <felix(at)crowfix(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Index usage vs large repetitions of key |
Date: | 2002-05-11 01:41:51 |
Message-ID: | 20020510214022.U8234-100000@zoraida.natserv.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 7 May 2002, Neil Conway wrote:
> On Tue, 7 May 2002 09:48:13 -0400 (EDT)
> "Francisco Reyes" <lists(at)natserv(dot)com> wrote:
> > On Sun, 5 May 2002 felix(at)crowfix(dot)com wrote:
> > > I think there is some way to force an indexed read, but I have
> > > forgotten what little I knew about that. If there is, you could try
> > > both ways and compare timings.
> >
> > Based on this info it may make sense to let it do the sequential scan.
>
> You can easily test this hypothesis by disabling sequential scans (SET
> enable_seqscan = off;), and using EXPLAIN ANALYZE to compare the performance
> of the resulting query plan with the one chosen by the planner to
> begin with.
I tried to set enable_seqscan = off and it still did a sequential scan.
> > Is there a drawback on having the index right now?
>
> Yes; inserts and updates will need to update the index. Depending on
> your queries, this can be a significant performance hit.
This is a "reporting" server and I do a set of "copy" jobs once a day,
followed by a vacuum analyze.. and a nightly "vacuum full"
From | Date | Subject | |
---|---|---|---|
Next Message | venkat | 2002-05-11 11:26:31 | |
Previous Message | grant | 2002-05-10 23:19:44 | Re: Why very high CPU usage |