Can the query planner create indexes?

From: Dario Beraldi <dario(dot)beraldi(at)ed(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Can the query planner create indexes?
Date: 2010-12-21 09:14:36
Message-ID: 20101221091436.10705ndh7nh748ow@www.staffmail.ed.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

This question is just for my curiosity...

When an index is available for a query, the planner decides whether to
use it or not depending on whether it would make the query perform
better, right? However if an index, which does not exist, would make
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?
Why is the query planner not allowed to create indexes, but only
allowed to use or not use what's available?

Am I misunderstanding the way the planner works? Any explanation &
clarification much appreciated!

All the best and Christmas wishes!
Dario

--

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Keller 2010-12-21 09:57:33 Re: How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?
Previous Message Raimon Fernandez 2010-12-21 09:06:28 Re: libpq ASYNC with PQgetResult and PQisBusy