Partial index usage - Mailing list pgsql-performance

From Laszlo Nagy
Subject Partial index usage
Date
Msg-id 499929AF.6090704@shopzeus.com
Whole thread Raw
Responses Re: Partial index usage
List pgsql-performance
Hi All,

I have these indexes on a table:


CREATE INDEX uidx_product_partno_producer_id
  ON product
  USING btree
  (partno, producer_id);


CREATE INDEX idx_product_partno
  ON product
  USING btree
  (partno);

Can I safely delete the second one? Will postgresql use
(partno,producer_id) when it only needs to order by partno? (partno is a
text field, producer_id is int4). Index sizes: 172MB and 137MB. I guess
if I only had one index, it would save memory and increase performance.

Another pair of incides, 144MB and 81MB respecively:


CREATE INDEX idx_product_producer_uploads
  ON product
  USING btree
  (producer_id, am_upload_status_id);


CREATE INDEX idx_product_producer_id
  ON product
  USING btree
  (producer_id);


am_upload_status_id is also an int4. Can I delete the second index
without performance drawback?

Thanks,

   Laszlo


pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: I/O increase after upgrading to 8.3.5
Next
From: Gregory Stark
Date:
Subject: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller