Re: PG 7.4.3 optimizer choosing sequential scan. Why?

From: Barry S <barry(at)nospam(dot)4(dot)me(dot)thx(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG 7.4.3 optimizer choosing sequential scan. Why?
Date: 2004-07-24 03:51:54
Message-ID: e-udnSr_5vFHQZzcRVn-oA@giganews.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> * The table contains one index: P1_NRN_ROAD_V (v, sobjid) (The index
> includes the column sobjid because the query projects this col, and its
> inclusion in the index allows it to be serviced without accessing the
> underlying table)
> Now, for the queries:
>
> QUERY 2: select sobjid from p1_nrn_road where v = 1
>
> The plan is "Seq Scan on p1_nrn_road (cost=0.00..22158.54 rows=2 width=8)"
>
>

That is puzzling. However, if you are only going to make a selection
criteria for 'v', why the multi-column index? Setting an index on only
'v' should produce better results...

-Barry

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-07-24 09:58:54 Re: PreallocXlogFiles
Previous Message Matthew T. O'Connor 2004-07-24 01:49:38 Re: [HACKERS] Wrong index choosen?