I have a huge table (over 30 million records) that I need to connect to. I would like to filter it by date so that one days worth of records are visible at at time. The problem is, no matter how I build the foundset there is a huge delay (many minutes) in displaying the data. I have tried a number of things including using a simple SQL query and getDataSetByQuery - with a returned record limit of 100 records.
The databaseManager.getDataSetByQuery runs very quickly, but when I do controller.loadRecords(dataset), it takes many minutes to complete - even though, in theory, there were only 100 records in the dataset. The form datasource is the table in question and it seems that whenever I do anything with the form, it grinds to a halt. For instance, I originally had the following:
databaseManager.getDataSetByQuery( controller.getServerName(), query, args, maxReturnedRows);
which took many minutes to run. When I replace ‘controller.getServerName()’ with the server name - as in:
databaseManager.getDataSetByQuery( “my_server”, query, args, maxReturnedRows);
the query ran in less than a second. It seems any time I reference the form - whether or not I am actually loading records - the system grinds to a halt. So I can do the query and get the dataset, but I cannot load it into the form.
This is definately a size problem as all other forms work well even with 100s of thousands of records. . I have a slightly smaller table with about 8 million records that is also delayed but not by nearly as much.
There must be a way to deal with large tables such as this - any help would be appreciated.
Rob.