Re: Help, 400 million rows, query slow, I stopped after 5 days

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christian Hofmann" <christian(dot)hofmann(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help, 400 million rows, query slow, I stopped after 5 days
Date: 2006-01-30 15:45:32
Message-ID: 5535.1138635932@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Christian Hofmann" <christian(dot)hofmann(at)gmx(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Charley Tiggs 2006-01-30 15:47:10 Re: quering NULL values
Previous Message Luis Silva 2006-01-30 15:41:10 quering NULL values