"Mitch Vincent" <mitch@huntsvilleal.com> writes:
>> Could you be a little more specific on your performance issues ?
> Well, I'm just noticing that simple select queries are taking 3-5 seconds -
> on a table with 63 fields, 10000ish rows of data. The ID fields are
> indexed, as well as several always-searched varchar() fields.
Hmm. What does EXPLAIN show for the query plan? You might also try
turning on execution stats (run psql with PGOPTIONS="-d2 -s" for
starters) to see what getrusage() can tell. The results will be in the
postmaster log and might look like this:
StartTransactionCommand
query: SELECT usename, relname, relkind, relhasrules FROM pg_class, pg_user WHERE usesysid = relowner and ( relkind =
'r'OR relkind = 'i' OR relkind = 'S') and relname !~ '^pg_' and (relkind != 'i' OR relname !~ '^xinx') ORDER BY relname
ProcessQuery
! system usage stats:
! 0.083256 elapsed 0.040000 user 0.000000 system sec
! [0.080000 user 0.020000 sys total]
! 12/1 [46/11] filesystem blocks in/out
! 0/0 [1/2] page faults/reclaims, 0 [0] swaps
! 0 [0] signals rcvd, 0/0 [2/2] messages rcvd/sent
! 8/5 [29/10] voluntary/involuntary context switches
! postgres usage stats:
! Shared blocks: 18 read, 0 written, buffer hit rate = 94.29%
! Local blocks: 0 read, 0 written, buffer hit rate = 0.00%
! Direct blocks: 0 read, 0 written
CommitTransactionCommand
regards, tom lane