On Mon, 2003-11-17 at 18:13, Tomasz Myrta wrote:
> Dnia 2003-11-17 19:00, Użytkownik Michele Bendazzoli napisał:
> > a is always present in the queries ... and other that (a, ab, abc) i
> > have only to query (ac): so I think I have to index separately only
> > (ac).
>
> For such cases consider ch
On Mon, 2003-11-17 at 17:23, Rod Taylor wrote:
> > Suppose by example that one have a table1 with a primary key over three
> > field (a, b, c):
> ..
> > are the indexes over (a) and (a, b) redundant (and so useless)?
>
> Yes, they are redundant not not necessarily useless.
>
> In short, an index
On Mon, 2003-11-17 at 17:14, Peter Eisentraut wrote:
> Michele Bendazzoli writes:
>
> > ALTER TABLE public.table1
> > ADD CONSTRAINT table1_pkey PRIMARY KEY(a, b, c);
> >
> > are the indexes over (a) and (a, b) redundant (and so useless)?
>
> Exactly.
> > p.s. I know, I'll have to begin to use
On Mon, 2003-11-17 at 17:15, Tomasz Myrta wrote:
> Dnia 2003-11-17 18:00, Użytkownik Michele Bendazzoli napisał:
> > p.s. I know, I'll have to begin to use the explain command ...
> > I promise I'll do it ;-)
>
> Use the explain analyze command and then answer yourself ;-)
I'm not in still in pro
> Suppose by example that one have a table1 with a primary key over three
> field (a, b, c):
..
> are the indexes over (a) and (a, b) redundant (and so useless)?
Yes, they are redundant not not necessarily useless.
In short, an index with 3 keys will be larger than an index with 1 key,
as such
Dnia 2003-11-17 18:00, Użytkownik Michele Bendazzoli napisał:
p.s. I know, I'll have to begin to use the explain command ...
I promise I'll do it ;-)
Use the explain analyze command and then answer yourself ;-)
Regards,
Tomasz Myrta
---(end of broadcast)
Michele Bendazzoli writes:
> ALTER TABLE public.table1
> ADD CONSTRAINT table1_pkey PRIMARY KEY(a, b, c);
>
> are the indexes over (a) and (a, b) redundant (and so useless)?
Exactly.
> p.s. I know, I'll have to begin to use the explain command ...
> I promise I'll do it ;-)
You could also hav
I wonder if is useless to set some indexes for columns contained in a
multifield primary key.
Suppose by example that one have a table1 with a primary key over three
field (a, b, c):
ALTER TABLE public.table1
ADD CONSTRAINT table1_pkey PRIMARY KEY(a, b, c);
are the indexes over (a) and (a, b)