From: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Yet another abort-early plan disaster on 9.3 |
Date: | 2014-09-20 11:51:49 |
Message-ID: | CAGTBQpb=hrq1pYDDBZBiUrMiO7vna2WDhwpPiYd1OW5eA8gdhg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On Sat, Sep 20, 2014 at 3:38 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
>> > Is there a canonical case of where 'abort early' plans help? (I'm new
>> > to that term -- is it a recent planner innovation...got any handy
>> > links?)
>>
>> Yeah, here's an example of the canonical case:
>>
>> Table t1 ( a, b, c )
>>
>> - "b" is low-cardinality
>> - "c" is high-cardinality
>> - There are separate indexes on both b and c.
>>
>> SELECT a, b, c FROM t1
>> WHERE b = 2
>> ORDER BY c LIMIT 1;
>
> You badly want a partial index on c WHERE b=2 for each value of 2 which
> appears in your queries.
>
> It would be neat to have an opclass which worked like that. Which would
> amount to having prefix compression perhaps.
I've been looking at that exactly.
One complexity of it, is that splitting becomes much harder. As in, recursive.
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2014-09-20 12:03:38 | WITH CHECK OPTION bug [was RLS Design] |
Previous Message | Amit Kapila | 2014-09-20 08:14:40 | Re: Scaling shared buffer eviction |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-09-20 15:01:01 | Re: Yet another abort-early plan disaster on 9.3 |
Previous Message | Björn Wittich | 2014-09-20 11:51:04 | Re: query a table with lots of coulmns |