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,
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
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::
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