Hello, I have a question regarding the maintenance_work_mem and the index creation. I have a dedicated postgresql server with 16GB of RAM. The shared_buffers is 4GB and the maintenance_work_mem is 2GB. I have a table with 28 mil records and 2 one-column indexes: 1. First index is for an integer column - size on disk 606MB 2. The second index is for a varchar column (15 characters usually) - size on disc 851MB. When I create the first index (for the integer column) it fits in the memory and it takes 1 minute to be created and is using around 1.7GB of the maintenance work memory... The second index is swapping on pgsql_tmp and it takes 26 minutes to be created so it looks like the 2GB of maintenance work memory is not enough to create a 851MB index... So my question is the 2GB of maintenance work memory would be enough only for indexes 600MB or smaller on disk? It looks like for creating an index is required a maintenance work memory 3 times larger than the size of the index on disk or I am missing other parameters? Thanks a lot, Ioana __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance