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@kgb.une.edu.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 : : +---------------------------------------+-----------------+ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match