From: | Dario Beraldi <dario(dot)beraldi(at)ed(dot)ac(dot)uk> |
---|---|
To: | Gabriele Bartolini <Gabriele(dot)Bartolini(at)2ndQuadrant(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Can the query planner create indexes? |
Date: | 2010-12-21 13:44:36 |
Message-ID: | 20101221134436.185247zdzs3w9i04@www.staffmail.ed.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ok, thanks a lot to all of you for your answers! (Always impressed by
the prompt feedback you get on this list!)
Quoting Gabriele Bartolini <Gabriele(dot)Bartolini(at)2ndQuadrant(dot)it>:
> Ciao Dario,
>
> On Tue, 21 Dec 2010 09:14:36 +0000, Dario Beraldi
> <dario(dot)beraldi(at)ed(dot)ac(dot)uk> wrote:
>> the query run better the planner is not able (allowed?) to create such
>> index, use it, and drop it once the query is done. Why is it so?
>
> Because it is not its responsibility. This is the simplest and most
> rational answer.
>
> I would reply with some questions that hopefully will give you the
> answer. How can you define a 'good' query from a 'bad' query?
> Consider the case when an user launches a wrong query and the
> planner you propose starts creating an index. I believe that would
> be a mess.
>
> Then ... how could you project this scenario in a concurrent context
> where multiple users launch queries that 'need' an index?
>
> I suggest that you look at the documentation for more information.
> Otherwise, I strongly suggest that you read the chapter on the
> planner from Greg's book on High Performance (which you can find
> from here: http://www.postgresql.org/docs/books/)
>
> Merry Christmas to you too!
>
> Cheers,
> Gabriele
>
> --
> Gabriele Bartolini - 2ndQuadrant Italia
> PostgreSQL Training, Services and Support
> Gabriele(dot)Bartolini(at)2ndQuadrant(dot)it - www.2ndQuadrant.it
>
>
--
Dr. Dario Beraldi
Institute of Evolutionary Biology
University of Edinburgh
West Mains Road
Edinburgh EH9 3JT
Scotland, UK
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Harris | 2010-12-21 13:44:45 | Re: Can the query planner create indexes? |
Previous Message | pasman pasmański | 2010-12-21 13:06:47 | [feature request] left/right join + limit optimization |