Re: Overriding the optimizer
От
Tomasz Rybak
Тема
Re: Overriding the optimizer
Дата
Msg-id
1134744439.5124.7.camel@localhost.localdomain
Ответ на
Re: Overriding the optimizer (Mark Kirkwood)
Список
Дерево обсуждения
Simple Join Kevin Brown <blargity@gmail.com>
Re: Simple Join "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Re: Simple Join Kevin Brown <blargity@gmail.com>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Re: Simple Join Kevin Brown <blargity@gmail.com>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Re: Simple Join Tom Lane <tgl@sss.pgh.pa.us>
Re: Simple Join Mitchell Skinner <mitch@arctur.us>
Re: Simple Join Kevin Brown <blargity@gmail.com>
Re: Simple Join Mitch Skinner <lists@arctur.us>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Tom Lane <tgl@sss.pgh.pa.us>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Tom Lane <tgl@sss.pgh.pa.us>
Re: Overriding the optimizer David Lang <dlang@invendra.net>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Jaime Casanova <systemguards@gmail.com>
Re: Overriding the optimizer Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Mitch Skinner <lists@arctur.us>
Re: Overriding the optimizer Kevin Brown <kevin@sysexperts.com>
Re: Overriding the optimizer Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Mark Kirkwood <markir@paradise.net.nz>
Re: Overriding the optimizer "Jim C. Nasby" <jnasby@pervasive.com>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Kevin Brown <kevin@sysexperts.com>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Kevin Brown <kevin@sysexperts.com>
Re: Overriding the optimizer "Jim C. Nasby" <jnasby@pervasive.com>
Re: Overriding the optimizer Bruno Wolff III <bruno@wolff.to>
Re: Overriding the optimizer Kyle Cordes <kyle@kylecordes.com>
Re: Overriding the optimizer Jaime Casanova <systemguards@gmail.com>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Kyle Cordes <kyle@kylecordes.com>
Re: Overriding the optimizer Mark Kirkwood <markir@paradise.net.nz>
Re: Overriding the optimizer Tomasz Rybak <bogomips@post.pl>
Re: Overriding the optimizer "Jim C. Nasby" <jnasby@pervasive.com>
Re: Overriding the optimizer Jaime Casanova <systemguards@gmail.com>
Re: Overriding the optimizer "Jim C. Nasby" <jnasby@pervasive.com>
Re: Overriding the optimizer "Craig A. James" <cjames@modgraph-usa.com>
Re: Overriding the optimizer Jaime Casanova <systemguards@gmail.com>
Re: Overriding the optimizer David Lang <dlang@invendra.net>
Re: Overriding the optimizer David Lang <dlang@invendra.net>
Re: Overriding the optimizer Jaime Casanova <systemguards@gmail.com>
Re: Simple Join David Lang <dlang@invendra.net>
Re: Simple Join Mark Kirkwood <markir@paradise.net.nz>
Re: Simple Join Kevin Brown <blargity@gmail.com>
Re: Simple Join Bruce Momjian <pgman@candle.pha.pa.us>
Re: Simple Join Jaime Casanova <systemguards@gmail.com>
Re: Simple Join Kevin Brown <blargity@gmail.com>
Dnia 16-12-2005, pią o godzinie 16:16 +1300, Mark Kirkwood napisał(a): > Craig A. James wrote: > > > > > What would be cool would be some way the developer could alter the plan, > > but they way of doing so would strongly encourage the developer to send > > the information to this mailing list. Postgres would essentially say, > > "Ok, you can do that, but we want to know why!" > > > > Yeah it would - an implementation I have seen that I like is where the > developer can supply the *entire* execution plan with a query. This is > complex enough to make casual use unlikely :-), but provides the ability > to try out other plans, and also fix that vital query that must run > today..... I think you could use SPI for that. There is function SPI_prepare, which prepares plan, and SPI_execute_plan, executing it. These functions are defined in src/backend/executor/spi.c. I think (someone please correct me if I'm wrong) you could prepare plan yourself, instead of taking it from SPI_prepare, and give it to SPI_execute_plan. SPI_prepare calls _SPI_prepare_plan, which parses query and calls pg_analyze_and_rewrite. In your version don't call this function, but provide PostgreSQL with your own plan (not-optimised according to PostrgeSQL, but meeting your criteria). -- Tomasz Rybak
В списке pgsql-performance по дате отправления