[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Huge table, records, scrolling, etc.

Joe Smith wrote:

> 
> "Mr. Burns" <Mr._Burns@xxxxxx> wrote in message
> news:diobpf$7pi$1@xxxxxxxxxxxxxxxxxxx
>> Hello Haris,
>>
>> I want it to do using SWT instead of AWT/SWING!
>> But thanks, anyway,
> 
> It's the same. To make virtual table work,
> (1) you need to know the exact number of rows,
> (2) then be able to locate rows using index numbers.
> Because of the first condition, even if you use Virtual tables,
> it takes time DBMS to compute the numbers. Second,
> you are using virtual table to handle large data. Unfortunately
> if you use scrollable result tables, this will be huge burdon to
> both client and dbms server. So unless you have well prepared
> data for this purpose, performance will be always an issue.
> 
> For scrollable result tables, look at JDBC APIs. It has
> nothing to do with AWT or SWT!
> 
It is simple get number of row in scrollable result and it is quick
(for good databases) - go to last record and get row number
with hibernate I do next :

ScrollableResults scr = q.scroll();
scr.last();
size = scr.getRowNumber() + 1;

it is simple and with pure JDBC
If you have slow query, this will be slow too, but it is true for only one
(firts) row, too.
Any database load complete query in memory (haven't cursors) and then there
isn't solution - this is case with mysql, for example - postgresql, special
oracle, work good
Peco