I'd suggest profiling the backend with both key types to get an idea of where the time is going.
I've been trying to use gprof to do some profiling, but I'm having troubles. Whats the best way to profile?
PS: actually, allowing for the 12-byte index tuple overhead, you couldn't have even twice as many keys per page. So there's something mighty odd here. Keep us posted.
Using the old system, I'd get about 7 internal node hits and about 110 "leaf" hits. Under the new one, I get about 4 internal node hits and about 160 "leaf" hits.
I'm just in the process of changing the key to:
typedef struct { float xmin; float ymin; float xmax; float ymax; char junk[16]; // make the 16 byte type into 32! } BOX2DFLOAT4;
To see what happens.
dave
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match