URGENT: Vaadin Table with Million Records

Hi,
We have multi-million records, and we want to use table. Obviously we cannot store all million records affront into the table. So we want to store say 20 records at time and when table slider changes say from 1st record to 5000th record, then I need to fetch 50000-50010 records (next 10) and put them in table.
Is it possible? If yes, I need to know at what row index the table slider is so that I can fetch those 10 records?
Also I guess I need to initialize the table with row count size 1 million so that slider can calculate its size accordingly and tell me the row position when I move table slider up and down.

Thanks for your input and help!

thanks
dheeraj

LazyQueryContainer, HbnContainer, JPAContainer all do exactly what you are asking for.

You can only put about 800 000 items in a table, because of a limitation in at least some browsers. The table is in an overflowing div element and it can’t be higher than around 16 million pixels. With around 20 pixels per row that’s about 800 000 rows. See
#4220
.

The Table component loads lazily only the visible items (plus some extra) in the browser, while the rest are fetched from the server-side as needed.

On the server-side, having a million or even billion records in a table is not a problem, as the container implementation can also do lazy caching. For example, the LazyContainer in the
ArrayContainer
package can contain some 2 billion (2^32 / 2) items. The 2 billion limit comes from the 32-bit size of Java integer, which the Container.Indexed interface uses for item index. The LazyQueryContainer and possibly some other containers as well are also lazy.

To get over the UI side limitation, I would recommend you make the user filter the content somehow before displaying it in the table - maybe e.g. with some filter components above the table. If the initial filtering is not too expensive and you have some reasonable default filter criteria, you could pre-fill them in the filtering controls.

Alternatively, you could check out the
PagedTable add-on
, but do read the related forum thread in case there are open issues.

In any case, I find that having an unfiltered scrollable (or paged for that matter) view of millions of records is quite unusable, as a single scroll step will be a huge number of rows.