From: Josh Berkus <josh@agliodbs.com>
To: Oleg Lebedev <oleg.lebedev@waterford.org>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: TPC-R benchmarks
Date: Thu, 2 Oct 2003 22:27:08 -0700
Message-ID: <200310022227.08554.josh@agliodbs.com> (raw)
In-Reply-To: <993DBE5B4D02194382EC8DF8554A52731E783E@postoffice.waterford.org>
References: <993DBE5B4D02194382EC8DF8554A52731E783E@postoffice.waterford.org>
Oleg,
> I have another question. How do I optimize my indexes for the query that
> contains a lot of ORed blocks, each of which contains a bunch of ANDed
> expressions? The structure of each ORed block is the same except the
> right-hand-side values vary.
Given the example, I'd do a multicolumn index on p_brand, p_container, p_size
and a second multicolumn index on l_partkey, l_quantity, l_shipmode. Hmmm
... or maybe seperate indexes, one on l_partkey and one on l_quantity,
l_shipmode & l_instruct. Test both configurations.
Mind you, if this is also an OLTP table, then you'd want to test those
multi-column indexes to determine the least columns you need for the indexes
still to be used, since more columns = more index maintainence.
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, oleg.lebedev@waterford.org, scott.marlowe@ihs.com
Subject: Re: TPC-R benchmarks
In-Reply-To: <200310022227.08554.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox