On Mon, 30 Aug 2004, Martin Sarsale wrote:
> "Multicolumn indexes can only be used if the clauses involving the
> indexed columns are joined with AND. For instance,
>
> SELECT name FROM test2 WHERE major = constant OR minor = constant;
You can use DeMorgan's Theorem to transform an OR clause to an
On Fri, 21 Nov 2003, Matthew T. O'Connor wrote:
> >> Do you know of an easy way to get a
> >>count of the total pages used by a whole cluster?
> >
> >Select sum(relpages) from pg_class.
You might want to exclude indexes from this calculation. Some large
read only tables might have indexes larger t
On Thu, 20 Nov 2003, Tom Lane wrote:
> Those claims cannot both be true. In any case, plain vacuum cannot grow
> the indexes --- only a VACUUM FULL that moves a significant number of
> rows could cause index growth.
er, yeah. you're right of course. having flashbacks of vacuum full.
--
On Thu, 20 Nov 2003, Josh Berkus wrote:
> Additionally, you are not thinking of this in terms of an overall database
> maintanence strategy. Lazy Vacuum needs to stay below the threshold of the
> Free Space Map (max_fsm_pages) to prevent creeping bloat from setting in to
> your databases. With
is there any way to update the stats inside a transaction? what i have is
something like:
select count(*) from foo;
-> 0
begin;
copy foo from '/tmp/foo'; -- about 100k rows
-- run some queries on foo which perform horribly because the stats
-- are way off (100k rows v. 0 rows)
commit;
it see