[Qt-interest] Huge amount of data in tree or whatever(view)
Marek Bronowicki
marek at cyberdeus.pl
Thu Dec 31 20:13:59 CET 2009
Hi
Perhaps this topic was "blended" and "sqashed" milions of times, but I
still cannot find a solution.
This is what I need to do:
I have one and a half milion of records in SQL database and I need to
show them all in some view.
What I know already that is that about 40000 records in treeview is a
total mass of information for my Athlon X2 2,0 to show and pressing the
end key hangs the soft for about 10 seconds to get on the end of the list.
My friend told me that this has to be model view, but after inserting
the same amount of data to model based view the result is the same.
I'm thinking about simple solution that can retrievie only shown rows
from the database with scrollbar as huge as the whole table. In example:
My treeview or tableview or whateverview has height for 50 rows (let's
say 10 px for row so 500px without header bar), so:
my select query: "SELECT * FROM table LIMIT 0,50;" and this is shown
live on the treeview
but vertical scrollbar it's as big as "select * from table"
If i will press page down, the select query will change to SELECT * FROM
table LIMIT 50,50;
the same with down arrow SELECT * FROM table LIMIT 1,50;
etc.
I don't know if i'm describing it right, or as usual only I'm
understanding what I'm writing:-)
Best Regards,
Marek Bronowicki
More information about the Qt-interest-old
mailing list