Hello all out there,
I have 2 tables in a postgresQL database running on an apache server. One table is about 30 columns, mostly ints with a few varchars and one date field. The other table is 3 columns, all text fields. Both tables have about 3500 rows of data.
A query on both tables on an indexed id field is taking, on average, between half a second and 2 seconds on the table with the integer fields, and, on average, about 25ms on the table with text fields (both have the same index).
Can anyone out there explain this? I thought it was text fields that took the time to query, not ints. Why is my predominantly int table taking so much longer to query?
Any help would be greatly appreciated!
-Ben Mattes
I have 2 tables in a postgresQL database running on an apache server. One table is about 30 columns, mostly ints with a few varchars and one date field. The other table is 3 columns, all text fields. Both tables have about 3500 rows of data.
A query on both tables on an indexed id field is taking, on average, between half a second and 2 seconds on the table with the integer fields, and, on average, about 25ms on the table with text fields (both have the same index).
Can anyone out there explain this? I thought it was text fields that took the time to query, not ints. Why is my predominantly int table taking so much longer to query?
Any help would be greatly appreciated!
-Ben Mattes