Re: [SQL] slow view

2006-10-11 Thread Stuart McGraw
On 2006/10/11 Stuart wrote: > [..] Apologies for following up my own post, but after struggling with that query for over a day, I figured out the answer within thirty minutes of posting. (Sigh) My slow query was: > SELECT p.id AS pid, a.id AS aid, sub.bid AS bid > FROM p > JOIN a ON

[SQL] slow view

2006-10-11 Thread Stuart
I am having a problem with the performance of a view that will be a critical part of a database system I am working on, and would appreciate some advice. Apologies for the length of this posting! I have a parent table P and to child tables A and B,: CREATE TABLE p ( id INT NOT NULL PRIMARY