Matt, if looks like you have a cross join between your tables.
Are the tables A, B, C related in some way?  IF so, then your queries
should look something like

SELECT fields from TabA LEFT OUTER JOIN TabB where TabA.IDb = TabB.IDb

And your view like

SELECT fields FROM TabB INNER JOIN TabC where TabB.IDc = TabC.IDc

This assumes that IDx is the related column


Regards,

Noah

-----Original Message-----
From: Matt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 07, 2007 10:41 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Slow View Performance

I have Tables TabA, TabB and TabC

 

I have a view ViewBC that is a view 

SELECT fields FROM TabB INNER JOIN TabC

 

If I run 

            SELECT fields FROM TabA LEFT OUTER JOIN ViewBC

it is way slow (like ignoring all indexes)

If I run

            SELECT fields FROM TabA LEFT OUTER JOIN TabB INNER JOIN TabC

 it runs as I expect.

 

Is this a know issue? Is there a simple workaround?

Matt Froncek
QODBC Development Support / FLEXquarters.com LLC Consultant QODBC Driver
for QuickBooks - Unleash your data at  <http://www.qodbc.com/>
www.qodbc.com

 





CONFIDENTIALITY NOTICE: 
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to