maintenance_work_mem and CREATE INDEX time - Mailing list pgsql-general

From Amit Langote
Subject maintenance_work_mem and CREATE INDEX time
Date
Msg-id CA+HiwqGNRGQCh0vyhcHVbuWjchQU3E7L9uzyZtsuWvyf_jqH6g@mail.gmail.com
Whole thread Raw
Responses Re: maintenance_work_mem and CREATE INDEX time
Re: [HACKERS] maintenance_work_mem and CREATE INDEX time
List pgsql-general
Hello,

While understanding the effect of maintenance_work_mem on time taken
by CREATE INDEX, I observed that for the values of
maintenance_work_mem less than the value for which an internal sort is
performed, the time taken by CREATE INDEX increases as
maintenance_work_increases.

My guess is that for all those values an external sort is chosen at
some point and larger the value of maintenance_work_mem, later the
switch to external sort would be made causing CREATE INDEX to take
longer. That is a smaller value of maintenance_work_mem would be
preferred for when external sort is performed anyway. Does that make
sense?

--
Amit Langote


pgsql-general by date:

Previous
From: Natalie Wenz
Date:
Subject: Re: Insert result does not match record count
Next
From: Amit Langote
Date:
Subject: Re: maintenance_work_mem and CREATE INDEX time