Link to home
Start Free TrialLog in
Avatar of jclobocar
jclobocar

asked on

MySQL performance question

I am changing a thirdy party application from Paradox to MySQL using Zeos Components.
There are various TTable components and original application uses FindKey and FindNearest Dataset methods.
What If I change TTable to TZQuery component and FindKey/FindNearest to Locate?
Is Locate method equivalent to a SELECT with WHERE clause adapted to seach criteria indicated in loPartialKey?
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jclobocar
jclobocar

ASKER

So, I have to rewrite all the code for selection using queries, correct?
basically that would be the best idea

it's probably a poorly performing application anyway ?
(unless it's only running over max 500 records)
you should try and avoid loading the whole table into memory and then using a locate to find 1 record

better would be to have a query with only loading the specific record using "select * from table where id = :id"

also try and use bind variables
and don't create your queries like "select * from table where id = 2"