Index Tuning Features [2] - Mailing list pgsql-hackers

From Kai-Uwe Sattler
Subject Index Tuning Features [2]
Date
Msg-id D1D3FD50-6359-4AB4-836E-44B7948ED338@tu-ilmenau.de
Whole thread Raw
Responses Re: Index Tuning Features [2]  (Simon Riggs <simon@2ndquadrant.com>)
Re: Index Tuning Features [2]  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Hi,
sorry for opening a new thread but I have just subscribed to the  
list. We have already an implementation of an index advisor for  
7.4.8. This is the  result of several master theses, so it's no  
production ready yet, but it works (with some limitations).
The main idea is:
1. to run the planner on the query
2. create virtual indexes (only in the data dictionary) based on some  
heuristics including multi-column indexes
3. run the planner again
4. extract the used virtual indexes and store them in a new table  
pg_indexadvisor together with a estimation of the gain

We use this in two ways:
- There is a proof of concept tool for determining the index  
recommendations for a given workload (basically it solves the  
knapsack  problem)
-  We have a more advanced approach where collecting index  
recommendations and chosing the right set is done continuously and  
automatically.

There are some papers, e.g. a demo paper at VLDB'03 where we have  
presented this on top of DB2 but now it is integrated in pgsql.

It definitely requires some work to port it to 8.2 and to make it  
usable for production environments.
Furthermore, there are some performance bottlenecks (creating virtual  
indexes, calling the planner twice) but I think they can be solved.

So, let me know if you are interested,   Kai


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [DOCS] Added links to the release notes
Next
From: Markus Schaber
Date:
Subject: Re: Upgrading a database dump/restore