From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: sql indexing suggestions needed |
Date: | 2007-03-20 19:26:42 |
Message-ID: | 46003572.2060008@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/20/07 14:11, Jonathan Vanasco wrote:
>
> On Mar 20, 2007, at 2:54 PM, Jonathan Vanasco wrote:
>
>> No matter how I index + analyze this table, including making an index
>> of every related column on the search, pg keeps doing a sequential
>> scan and never includes an index -- which takes ~2minutes to do. I
>> really need to cut this down.
>
> a friend just chimed in off-list -- i had missed putting the 'id' column
> in the large index of all the used columns , a common mistake. works
> like a charm now.
If the WHERE clause filters out most of the records, having ID in
the index shouldn't be needed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGADVyS9HxQb37XmcRAjJZAKCX1VmuSVdS9VfK6mXrYNl7mVATjQCgpWef
MVFm2rH8+paCqnzyw9NyKZk=
=kbvB
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Wildenhain | 2007-03-20 19:37:27 | Re: LISTEN/NOTIFY and python |
Previous Message | Ron Johnson | 2007-03-20 19:24:36 | Re: sql indexing suggestions needed |