Thread: Maintenance_work_mem influence on queries

Maintenance_work_mem influence on queries

From
luchot
Date:

Hello,

I am doing some test with differents values for the parameter maintenance_work_mem in order to

ameliorate the time for the creation of index and and the use of vacuum and analyse.

I read in the doc that this parameter is just for create index, vacuum and analyse and foreign key .

But when i test 2 queries with differents values the result are twice big :

for mwm to 64 Mo   the query 1 last 34 min and the query 2   41 min

for mwm to 512 mo the query 1 last 17 min and the query 2 21 min

So my question is in what condition the parameter maintenance_work_mem influence on the execution of queries. 

  Thanks ,