Re: sql indexing suggestions needed - Mailing list pgsql-general

From Ron Johnson
Subject Re: sql indexing suggestions needed
Date
Msg-id 46003572.2060008@cox.net
Whole thread Raw
In response to Re: sql indexing suggestions needed  (Jonathan Vanasco <postgres@2xlp.com>)
List 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-----

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: sql indexing suggestions needed
Next
From: Tino Wildenhain
Date:
Subject: Re: LISTEN/NOTIFY and python