Re: Simple Join
От
Kevin Brown
Тема
Re: Simple Join
Дата
Msg-id
200512150146.06336.blargity@gmail.com
Ответ на
Re: Simple Join (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>
On Wednesday 14 December 2005 18:36, you wrote: > Well - that had no effect at all :-) You don't have and index on > to_ship.ordered_product_id do you? - try adding one (ANALYZE again), and > let use know what happens (you may want to play with SET > enable_seqscan=off as well). I _DO_ have an index on to_ship.ordered_product_id. It's a btree. > And also, if you are only ever interested in paid = true and > suspended_sub = false, then you can recreate these indexes as partials - > e.g: > > CREATE INDEX paid_index ON ordered_products (paid) WHERE paid = true; > CREATE INDEX suspended_sub_index ON ordered_products (suspended_sub) > WHERE suspended_sub = false; They're currently defined as individuals and I'm depending on the bitmap indexing. > > So what's the best way to performance wiggle this info out of the db? > > The list of values is only about 30 tuples long out of this query, so I > > was figuring I could trigger on insert to to_ship to place the value into > > another table if it didn't already exist. I'd rather the writing be slow > > than the reading. > > Yeah - all sort of horrible denormalizations are possible :-), hopefully > we can get the original query to work ok, and avoid the need to add code > or triggers to you app. That'd be great.
В списке pgsql-performance по дате отправления
От: Tom Lane
Дата: