ning wrote:
> The log is really long,
Which usually signals a problem with the query.
> but I compared the result of "explain analyze"
> for first and later executions, except for 3 "time=XXX" numbers, they
> are identical.
>
They are supposed to be identical unless something is really badly broken.
> I agree with you that PostgreSQL is doing different level of caching,
> I just wonder if there is any way to speed up PostgreSQL in this
> scenario,
>
This is what EXPLAIN ANALYZE for. Could you post the results please?
Cheers,
Mike