Subject | How can I load a query in memory? |
---|---|
Author | pepmallorca |
Post date | 2002-04-06T19:59:53Z |
Hello:
Is posible in IBO load a query in memory?
If you need more help, my problem is the next:
======================================================
* I have to do a bucle (for example of 320.000 iterations).
* In each iteration, I have to search a value in the query (that I
hope it was in memory).
* A good thing: this table will not change in all the iterations.
--
I think in some solutions:
1) Before begin the bucle, I can load this records (not all the
table) in a StringList or similar, and in the bucle, search in the
StringList (this is in memory). I think it's no the best method. So
manual !!!
2) Write an IF LOCATE line inside the bucle. I'll test it but is
very slowly (the search is with 2 fields). I have test to write an
Qry.readonly:=true
Qry.fetchall;
Qry.prepare;
...
to increase speed (the result is the same...)
3) Call to an stored procedure with the select (it uses the primary
key index). Slowly. More similar to (2)
Exists in IBO an alternative to 2) or 3) and load the query in
memory.
Thanks,
Is posible in IBO load a query in memory?
If you need more help, my problem is the next:
======================================================
* I have to do a bucle (for example of 320.000 iterations).
* In each iteration, I have to search a value in the query (that I
hope it was in memory).
* A good thing: this table will not change in all the iterations.
--
I think in some solutions:
1) Before begin the bucle, I can load this records (not all the
table) in a StringList or similar, and in the bucle, search in the
StringList (this is in memory). I think it's no the best method. So
manual !!!
2) Write an IF LOCATE line inside the bucle. I'll test it but is
very slowly (the search is with 2 fields). I have test to write an
Qry.readonly:=true
Qry.fetchall;
Qry.prepare;
...
to increase speed (the result is the same...)
3) Call to an stored procedure with the select (it uses the primary
key index). Slowly. More similar to (2)
Exists in IBO an alternative to 2) or 3) and load the query in
memory.
Thanks,