Joe
Joe

Reputation: 47649

Postgres not using enough CPU during index build!

I have a Postgres instance building a GIN index. It's looking at about 200,000 rows and it's so far taken about 9 hours. Who knows how long it will take eventually. The problem is that it's using about 2% of CPU when I'd like it to use more like 90%. Is there any way to force it to speed up?

Upvotes: 2

Views: 1133

Answers (1)

DVK
DVK

Reputation: 129481

The main bottleneck is probably disk IO and not CPU.

If you're on a Windows machine, you can check disk IOs using Process Explorer (freeware), if on Unix, use iostat, sar, DTrace (haven't done the latter in a while so not 100% sure of the best tool)

Upvotes: 3

Related Questions