Skip site navigation (1) Skip section navigation (2)

Re: Avoiding a seq scan on a table.

From: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
To: LWATCDR <lwatcdr(at)gmail(dot)com>
Cc: "Brian Hurt" <bhurt(at)janestcapital(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Avoiding a seq scan on a table.
Date: 2008-01-14 16:54:30
Message-ID: 264855a00801140854q775d48d9p85611b5714db830d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Jan 14, 2008 11:45 AM, LWATCDR <lwatcdr(at)gmail(dot)com> wrote:

> Thanks would you suggest a btree or a hash? My guess would a hash
> since it uses an =.
>

You can pretty much ignore hash indexes in Postgres.  They are, in nearly
every case (every case that I know of), slower than btree.  Just make the
indexes using the default indexing scheme.  Again, do not forget to analyze
the table after creating the indexes.

Sean

In response to

Responses

pgsql-novice by date

Next:From: Brian HurtDate: 2008-01-14 17:03:58
Subject: Re: Avoiding a seq scan on a table.
Previous:From: LWATCDRDate: 2008-01-14 16:45:53
Subject: Re: Avoiding a seq scan on a table.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group