Hello --
First, my obligatory system information:
- SmartGWT Power version: 2.3
- Current browsers: Chrome (v6.0.472.63), IE (v8.0.6001.18702), Firefox (v3.6.9)
- Java: Sun JVM build 1.6.0_20-b02
- Tomcat version: 5.5.29
- Desktop OS: Windows XP Service Pack 3
- System memory: 4 Gb
- Oracle version: 11g
- Oracle JDBC driver version: ojdbc6, 11.2.0.1.0
I currently have a table with approximately 2.25 million rows. I have defined a simple DataSource associated with this table, and associated the DataSource with a ListGrid. Upon rendering the ListGrid for the first time and fetching data, data from this table arrives quickly and successfully. Visually, the ListGrid displays 20 rows in the browser's interface, and the page size is kept at 75 rows.
It does not take long for query performance to slow dramatically, and eventually max out the heap space, regurgitating OutOfMemoryErrors to Tomcat's logs. If I grab the ListGrid's scroll bar's cursor and drag it approximately half-way down the side of the grid, queries can take upwards of 2.5 minutes to return data (when returning data successfully). Performing this large of a cursor-drag query more than four or five times nets OutOfMemoryErrors. The JVM's maximum heap size is set at 1,024 Mb.
The last messages directed to Tomcat's log files immediately prior to the wait (and eventual OutOfMemoryError) resemble the following:
It's important to mention that the table whose data I'm querying has a composite primary key. In addition, I have reindexed the table immediately prior to performing the queries that result in the poor performance and OutOfMemoryErrors above.
Does anyone have suggestions on how best to optimize ListGrids and accompanying DataSources for acceptable performance when querying tables whose rows number in the millions? If Isomorphic's SQL query is, indeed, selecting all rows in this table (as the log file's query suggests) prior to isolating only those rows to return to the client, is this backend operation dependent upon the amount of memory I can allocate for the JVM's heap?
I've attached the DataSource definition file for reference.
Thanks for any assistance!
Regards,
Brad Andersen
AZAD Consultant - ARRIS Group, Inc.
First, my obligatory system information:
- SmartGWT Power version: 2.3
- Current browsers: Chrome (v6.0.472.63), IE (v8.0.6001.18702), Firefox (v3.6.9)
- Java: Sun JVM build 1.6.0_20-b02
- Tomcat version: 5.5.29
- Desktop OS: Windows XP Service Pack 3
- System memory: 4 Gb
- Oracle version: 11g
- Oracle JDBC driver version: ojdbc6, 11.2.0.1.0
I currently have a table with approximately 2.25 million rows. I have defined a simple DataSource associated with this table, and associated the DataSource with a ListGrid. Upon rendering the ListGrid for the first time and fetching data, data from this table arrives quickly and successfully. Visually, the ListGrid displays 20 rows in the browser's interface, and the page size is kept at 75 rows.
It does not take long for query performance to slow dramatically, and eventually max out the heap space, regurgitating OutOfMemoryErrors to Tomcat's logs. If I grab the ListGrid's scroll bar's cursor and drag it approximately half-way down the side of the grid, queries can take upwards of 2.5 minutes to return data (when returning data successfully). Performing this large of a cursor-drag query more than four or five times nets OutOfMemoryErrors. The JVM's maximum heap size is set at 1,024 Mb.
The last messages directed to Tomcat's log files immediately prior to the wait (and eventual OutOfMemoryError) resemble the following:
Code:
=== 2010-09-25 14:44:00,059 [55-6] INFO SQLDriver - [builtinApplication.schedule_fetch] Executing SQL query on 'Oracle': SELECT COUNT(*) FROM adent.schedule WHERE ('1'='1')
=== 2010-09-25 14:44:01,665 [55-6] DEBUG SQLDataSource - [builtinApplication.schedule_fetch] JDBC driver windowed select rows 1546704->1546779, result size 75. Query: SELECT schedule.window_position, schedule.duration, schedule.spot_id, schedule.zone_id, schedule.window_open_date, schedule.status, schedule.event_id, schedule.machine_id, schedule.channel_id FROM adent.schedule WHERE ('1'='1')
=== 2010-09-25 14:45:42,169 [55-3] ERROR IDACall - Top-level servlet error:
java.lang.OutOfMemoryError: Java heap space
Does anyone have suggestions on how best to optimize ListGrids and accompanying DataSources for acceptable performance when querying tables whose rows number in the millions? If Isomorphic's SQL query is, indeed, selecting all rows in this table (as the log file's query suggests) prior to isolating only those rows to return to the client, is this backend operation dependent upon the amount of memory I can allocate for the JVM's heap?
I've attached the DataSource definition file for reference.
Thanks for any assistance!
Regards,
Brad Andersen
AZAD Consultant - ARRIS Group, Inc.
Comment