[Mulgara-general] iTQL question regarding the relationship between query size and query speed
Life is hard, and then you die
ronald at innovation.ch
Fri Apr 18 03:45:36 UTC 2008
On Wed, Apr 16, 2008 at 10:31:29AM -0500, Paul Gearon wrote:
> On Wed, Apr 16, 2008 at 7:52 AM, David Moll <DMoll at myaperio.com> wrote:
> > I have some questions about iTQL query structure and performance. Although
> > is it technically TQL now? In any case, I shall preface my question with a
> > statement regarding our setup.
> <snip query>
> I don't see any need for subqueries here, which will certainly be
> slowing you down. I believe the equivalent query is:
> > Any insights or comments are appreciated.
> You should try to use AND more than subqueries. These will be much faster.
Just looking at your query I would agree: subqueries currently seem to
have a noticeable overhead. While we use them quite frequently, I have
rewritten our heaviest query to not use subqueries and have seen a
10-fold speedup for it. It isn't always possible to rewrite the query,
of course, but in this case it looks like it is.
More information about the Mulgara-general