Jerome Macaranas <jerome(at)gmanmi(dot)tv> writes:
> LOG: query: SELECT * FROM phpbb_smilies
> LOG: duration: 0.005410 sec
> LOG: duration: 390.731807 sec
> -- this table has only 295 rows
I think this is an artifact of your lack-of-vacuuming problems;
the table has become hugely bloated and it takes a long time to
scan through it to find the few live rows. You'll need to do
a VACUUM FULL (or possibly CLUSTER) to shrink the table back
to a reasonable size.
regards, tom lane