[PERFORM] Slow hash join performance with many batches

2015-06-01 Thread Alex Adriaanse
I have several databases that have the same schema but different amounts of data in it (let's categorize these as Small, Medium, and Large). We have a mammoth query with 13 CTEs that are LEFT JOINed against a main table. This query takes <30 mins on the Small database, <2 hours to run on Large,

Re: [PERFORM] Hosted servers with good DB disk performance?

2009-05-26 Thread Alex Adriaanse
Greg Smith wrote: What I'd love to have is a way to rent a fairly serious piece of dedicated hardware, ideally with multiple (at least 4) hard drives in a RAID configuration and a battery-backed write cache. The cache is negotiable. Linux would be preferred, FreeBSD or Solaris would also work

Re: [PERFORM] Bad row estimates

2006-03-08 Thread Alex Adriaanse
Thank you all for your valuable input. I have tried creating a partial index, a GIST index, and a GIST + partial index, as suggested, but it does not seem to make a significant difference. For instance: CREATE INDEX test_table_1_interval_idx ON test_table_1 USING GIST (box(point(start_ts::

[PERFORM] Bad row estimates

2006-03-03 Thread Alex Adriaanse
Hello, I am doing some query optimizations for one of my clients who runs PostgreSQL 8.1.1, and am trying to cut down on the runtime of this particular query as it runs very frequently: SELECT count(*) FROM test_table_1 INNER JOIN test_table_2 ON (test_table_2.s_id = 13300613 AND te