Itamar Lins wrote:
Yes, I understand.
Another problem we consider a table with 3Gib for example how to work
with it via browse? because my system is 100% via browse style excel.
This is syntaxe below is impraticable.
DBUSEAREA(, "select * from my_table")
How to calculate end of query and run SQL again using browse ?
DBUSEAREA(, "select * from my_table limit 100")
Let's say table has unique numeric id column (auto_increment or
similar). We use two techniques to solve the problem:
1) even if database is large (but not huge), you can try to do:
select id from * mytable order by id;
MySql returns 50000 ids very quickly. Later on page down/page up action
you just do subqueries:
select * from mytable where id in (...) order by id;
... is a list of first, second, third, ... <rowcount> numbers of ids
from the "ids query".
2) if table is huge the second technique is better:
First page:
select * from mytable order by id limit 20
Next page (after page down):
select * from mytable where id > nPrevQueryLastId order by id limit 20
Please, do not ask how to use it browse. We are doing it by MoveTo(),
LineTo(), TextOut(), etc and a lot of code on the top of it.
Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour