Franck Routier <franck.routier@xxxxxxxxx> writes: > Right, explain alone takes 3.6 seconds, so the time really seems to go > query planning... Well, you've not shown us the query, so it's all going to be speculation. But maybe you have some extremely expensive function that the planner is evaluating to fold to a constant, or something like that? The generated plan isn't terribly complicated, but we can't see what was required to produce it. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance