plan-reading extensive tutorial?

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: plan-reading extensive tutorial?
Date: 2004-04-19 06:35:24
Message-ID: 4083732C254.1404KG@129.180.47.120
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In the docs it says "Plan-reading is an art that deserves an extensive
tutorial, which this is not". Is there one? I've gone beyond simple
queries (which are performing well) to the more difficult queries (which
aren't).

e.g. 4 generation family tree implemented as a view using 14 left outer
joins back into the same table. If I select only from it, the optimizer
uses the primary key (single int4 field) in nested loop left join on all
14. If I join the view to another table, it wants to do it sequentially
(the other table is just a single int4 field with 1 row. the field is
the primary key and also has a foreign key constraint to the main table).

I dont want exact help on this particular query. Posting every query
I'm having a problem with to the mailing list is a waste of both my time
and yours (and not really feasable since it requires all the table
structures and data). I have tried the obvious with vacuum full
analyze, and changing the settings (like enable_seqscan,
join_collapse_limit, from_collapse_limit...).

klint.

+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : kg(at)kgb(dot)une(dot)edu(dot)au : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2004-04-19 07:33:10 Re: plan-reading extensive tutorial?
Previous Message Hadley Willan 2004-04-19 05:42:21 Re: Date manipulation