Hi, I have this table: START_IP BIGINT PRIMARY KEY END_IP BIGINT SLD_NAME VARCHAR(60) COUNTRY_CODE CHAR(2) CONNECTION_NAME VARCHAR(15)
The table is being used to find the information about a specific IP and the query is something like this: SELECT * FROM TABLE1 where start_ip<=? order by start_ip desc limit 1; For a regular db engine that is the optimized version of a simple range query: where ? between start_ip and end_ip; explain output: FROM PUBLIC.TABLE1 /* PUBLIC.PRIMARY_KEY_8: START_IP <= 67240449 */ WHERE START_IP <= 67240449 ORDER BY 1 DESC LIMIT 1 The table has about 2M rows and I'm getting 1-2 seconds response time for a single connection. when setting the trace level to 2 I'm seeing the queries my java app is issuing and also this: "command: slow query: 1122" I'm using a tcp server going up with 8gb memory, 1.5g cache, no locking (mode 0) and db_close_delay -1 Is there anything I can do to improve the performance? Thanks -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
