From: | "Arjen van der Meijden" <acm(at)tweakers(dot)net> |
---|---|
To: | "'Richard Huxton'" <dev(at)archonet(dot)com>, "'Johnson, Shaunn'" <SJohnson6(at)bcbsm(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: splitting a table? |
Date: | 2003-06-20 14:37:09 |
Message-ID: | 001401c33739$71511a70$3ac15e91@acm |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Richard Huxton wrote
> You could split the table and build a view that UNIONs the
> individual tables,
> but that's not very elegant and 10 million records isn't much.
I think that union-solution would be quite a bit slower than simply
searching through the table.
> Things to check for:
> - Have you run VACCUM FULL or VACUUM ANALYSE recently?
> - Are your "where" data-types the same as the index data-types?
> - See if the indexes are used in the EXPLAIN ANALYSE output.
And of course whether the hd-parameters are set in case of an ide disk,
whether there is sufficient memory allocated for the shared buffers,
etc.
It may also be wise to have multiple indexes. If you, for instance,
search very often on a combination of values and very often on a single
value two indexes (the combined one and the separate one) could improve
both queries. Although the combined index would be used in both cases if
that were the only index, it isn't the most efficient index to use in
that case, afaik.
Arjen
From | Date | Subject | |
---|---|---|---|
Next Message | Johnson, Shaunn | 2003-06-20 14:46:03 | Re: splitting a table? |
Previous Message | Kevin Jacobs | 2003-06-20 14:29:43 | Re: PlPython |