Re: Help, 400 million rows, query slow, I stopped after 5 days - Mailing list pgsql-novice

From Tom Lane
Subject Re: Help, 400 million rows, query slow, I stopped after 5 days
Date
Msg-id 5535.1138635932@sss.pgh.pa.us
Whole thread Raw
In response to Help, 400 million rows, query slow, I stopped after 5 days  ("Christian Hofmann" <christian.hofmann@gmx.de>)
Responses Re: Help, 400 million rows, query slow, I stopped after 5 days  ("Christian Hofmann" <christian.hofmann@gmx.de>)
List pgsql-novice
"Christian Hofmann" <christian.hofmann@gmx.de> writes:
> INSERT INTO table2 (my_col) SELECT DISTINCT my_col from table1
> But this query was so slow that I stopped it. I let it run for five days!

What PG version is this, and what do you have sort_mem set to?
Increasing sort_mem to a few hundred meg should help, assuming the
server can spare that much RAM.

> In the Server there is only 1 GB RAM. My_col is using a bitmap index.

There are no bitmap indexes in Postgres...

            regards, tom lane

pgsql-novice by date:

Previous
From: "Luis Silva"
Date:
Subject: quering NULL values
Next
From: Charley Tiggs
Date:
Subject: Re: quering NULL values