Re: Index not used for simple query, and yes I ran vacuum analyze

From: Matthew Braithwaite <mab-lists(at)braithwaite(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org, Matthew Braithwaite <matt(at)braithwaite(dot)net>
Subject: Re: Index not used for simple query, and yes I ran vacuum analyze
Date: 2001-10-01 22:10:21
Message-ID: 868zevggfm.fsf@limekiller.braithwaite.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 26 Sep 2001 14:08:28 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> said:
>
> Matthew Braithwaite <mab-lists(at)braithwaite(dot)net> writes:
>> I RTFM but I'm still confused. I have a table, headers
>>> mab=> \d headers
>>> Table "headers"
>>> Attribute | Type | Modifier
>>> -----------+---------+---------------------------------------------------------
>>> header_id | integer | not null default nextval('headers_header_id_seq'::text)
>>> part_id | integer | not null
>>> key | text |
>>> value | text |
>>> Index: headers_pkey
>
>> I have indexed the table by part_id:
>
>>> mab=> \d headers_ref_idx
>>> Index "headers_ref_idx"
>>> Attribute | Type
>>> -----------+---------
>>> part_id | integer
>>> btree
>
> Um, it sure looks like that index is not on that table.

Whoof. I think you are right; I had erroneously used that index name
in two places in my schema. I have it working now; next time I'll
post to pgsql-idiot. :-)

> Note that the "\d headers" output shows only one index, named
> headers_pkey.

Oh! I didn't know that all of a table's indices were supposed to show
up there. Thanks, that's handy to know.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Manuel Sugawara 2001-10-01 23:17:00 Re: country code and state code tables
Previous Message WIERS,FREDERIK (HP-Netherlands,ex1) 2001-10-01 16:03:28 Re: access to postgres?