Re: Ado SQL Concept question.
From: RPM (rick_at_tariffnet.com)
Date: 03/05/04
- Next message: Ray Marron: "Re: Ado SQL Concept question."
- Previous message: RPM: "Re: Ado SQL Concept question."
- In reply to: Richard Speiss: "Re: Ado SQL Concept question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 5 Mar 2004 11:48:45 -0500
Hi Richard,
>"Richard Speiss" <rspeiss@mtxinc.com> wrote in message
news:40477b0b$1@newsgroups.borland.com...
> Hi Rick,
>
> Here is something you can do that will speed up your lookups
>
> At the beginning of your routine, create a query that returns those values
> for all rows in the lookup table
>
> qryLookup.Close;
> qryLookup.SQL.Clear;
> qryLookup.SQL.Append('SELECT W, TI, WV, WH FROM PointInformation ORDER BY
> W');
> qryLookup.Open;
>
> for iIdx := 1 to LotsOfRecords do begin
> // Instead of opening the lookup query, now you just use Locate
> if qryLookup.Locate('W', sCLLI, []) = True then begin
> // do some processing here
> end
> end
>
> qryLookup.Close
This looks interesting... just a bit worried about memory useage. I'm going
to try some test. Good idea.
> The slow part of using SQL is the act of opening the query. This will
cause
> your program to slow down to a crawl if you are doing it for every record.
I'm just 'stress' testing the lookup. If I use database pools to serve web
browsers, each request (lookup) will be independent of any other... so I'm
trying to get an idea of what I can do to speed up that lookup. My
application has been alotted a time of 50ms for each call.... kinda tight.
:)
> The downside to the above method is that the lookup list is fixed for the
> duration of your loop. If you can live with that then you should be okay
The user only reads the data, and the data only changes once a month... so
no problem there. :)
Thanks for the ideas,
Rick
- Next message: Ray Marron: "Re: Ado SQL Concept question."
- Previous message: RPM: "Re: Ado SQL Concept question."
- In reply to: Richard Speiss: "Re: Ado SQL Concept question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|