After several hours (over a period of a couple of months) of battling this problem, I finally found the cause. I was not looking in the right place. Turns out that I had a dependent query that were being opened after the client TQuery. Actually, there were 3 different dependent queries, only one of which was causing the problem. On my system, I never ran into the problem, primarily because my testing was not comprehensive enough -- and the attorney ran into it almost immediately every time he used it (and he just complained that it was too slow). I finally just recorded *exactly* what he was doing, and then easily duplicated the problem.<br>
<br>The problem query was the "cases" table, which has a client ID foreign key, an OID (primary key), a date and a large text field. PostgreSQL did not have any slowdown at all with this database schema, so I was surprised to see that SQLite took two orders of magnitude longer to open that same table.<br>
<br>What I did was simply close the case table whenever doing the incremental search. That works, although it seems to be a bit of a hack.<br><br><br><br><div class="gmail_quote">On Sun, Aug 7, 2011 at 3:08 AM, Ludo Brands <span dir="ltr"><<a href="mailto:ludo.brands@free.fr" target="_blank">ludo.brands@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>><br>
> There has GOT to be something I'm not understanding. I<br>
> thought SQLite was going to speed things up, not slow them down.<br>
><br>
<br>
</div>Clearly you are not providing enough information to reproduce the problem.<br>
So far it has all been guess work for people trying to help. Fe. your<br>
initial request for help "forgot" to mention that there were several<br>
dependant queries. If you upload the project we can take a look at it. Data<br>
aren't needed. Populating with random data is easy. Seen the size of your<br>
project (I guess this mailing list has attachment size limits) upload it<br>
somewhere and post the link.<br>
<span><font color="#888888"><br>
Ludo<br>
</font></span><div><div><br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Howard Lee Harkness<br><a href="tel:%28214%29%20390-4896" value="+12143904896" target="_blank">(214) 390-4896</a><br><br>