On Fri, Apr 19, 2013 at 3:59 PM, Erik Rose <[email protected]> wrote:

> Tried this and it worked.  "callers:someFunc" took, according to the
> returned web page "Query executed in 225.399s"
>
> That's a long time.  How can I help you figure out which index (or
> indices) are missing?  If I remember correctly, that query used to have an
> obnoxious number of outer and inner joins.  Maybe there's a way to
> denormalize the data a bit such that the query could be simplified?
>
>
> Try sticking explain=True in the query string, and see if that reveals
> anything.
>
>
I have done this and have output, but am not sure how to interpret it.
I've read through http://www.sqlite.org/eqp.html, which gives me just
enough information to think that I don't really know enough to know what
could be changed to make the actual query more efficient.

Based on prior SQL knowledge (now probably decades old), the number of
subqueries are what's doing it in.  I suppose there are ways to optimize
the DB for subqueries of this type, and I'll let-me-google-that-for-me to
find out.

FWIW, I tried adding "LIMIT 1" to all of the subqueries of the "EXISTS"
predicate, but that didn't change anything.  I also tried adding an index
on files(icon)--no change either.

I can provide the "explain" output if that would help someone more sqlite
knowledgeable than I to deduce this mystery.

-- 
Chris Cleeland
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to