I've got a table which has 12 milions records with Point geometry column.
I've added an index on the geometry column.

My query is really simple points search within a polygon.

SELECT count("the_geom") FROM table WHERE "the_geom" && GeomFromText('POLYGON ((.xxxxxxxx, xxxxx,....))', 4326)

It usally takes around 25 seconds returning 20,000 records.
I think 25 seconds is slow. Do you think it's normal?
I've played around with shared_buffers size in the conf but didn't improve at all.

Has anyone got any suggetions to improve?