Re: strange query plan with LIMIT - Mailing list pgsql-performance

From tv@fuzzy.cz
Subject Re: strange query plan with LIMIT
Date
Msg-id 9f040b694b5b87c5ab1754b37e367e10.squirrel@sq.gransy.com
Whole thread Raw
In response to Re: strange query plan with LIMIT  (anthony.shipman@symstream.com)
Responses Re: strange query plan with LIMIT
List pgsql-performance
> If I had set the primary key to (diag_id, create_time) would simple
> queries on
> diag_id still work well i.e.
>     select * from tdiag where diag_id = 1234;

Yes. IIRC the performance penalty for using non-leading column of an index
is negligible. But why don't you try that on your own - just run an
explain and you'll get an immediate answer if that works.

regards
Tomas


pgsql-performance by date:

Previous
From: Robert Klemme
Date:
Subject: Re: [GENERAL] [PERFORMANCE] expanding to SAN: which portion best to move
Next
From: "Anibal David Acosta"
Date:
Subject: how much postgres can scale up?