Are you sure you are using correct data types on indexes?Did not know about this...
e.g. if field1 is an int2 field, then following query would not use an index.our fk have the type bigint, when i try one simple select like this:
explain analyze SELECT --columns-- FROM KEY_VALUE_META_DATA t0 WHERE t0.ID_FOREIGN_TABLE = 21110;
i see that no index is being used whereas when i use
explain analyze SELECT --columns-- FROM KEY_VALUE_META_DATA t0 WHERE t0.ID_FOREIGN_TABLE = 21110::bigint;
an index is used. Very fine, the performance is about 10 to 100 times faster for the single select.
I am using WebObjects with JDBC. I will now create a DB with integer instead of bigint and see how this performs.
regards David
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]