Re: [SQL] Multicolum index and primary key

2003-11-18 Thread Michele Bendazzoli
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). > &

Re: [SQL] Multicolum index and primary key

2003-11-17 Thread Michele Bendazzoli
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

Re: [SQL] Multicolum index and primary key

2003-11-17 Thread Michele Bendazzoli
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. &g

Re: [SQL] Multicolum index and primary key

2003-11-17 Thread Michele Bendazzoli
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 yo

[SQL] Multicolum index and primary key

2003-11-17 Thread Michele Bendazzoli
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)

Re: 7.4 and 7.3.5 showstopper (was: Re: [SQL] Bug in Rule+Foreing

2003-10-31 Thread Michele Bendazzoli
On Thu, 2003-10-30 at 20:13, Jan Wieck wrote: > Thanks for reporting, Michele. Thank to you! The speed and level of your responses exceeds every my more rose-colored expectation ;-) > In the meantime, you might want to use a > BEFORE INSERT trigger in PL/pgSQL that tries to UPDATE the row and i

Re: [SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Michele Bendazzoli
On Thu, 2003-10-30 at 18:29, Jan Wieck wrote: > Not entirely. On which table(s) are the REFERENCES constraints and are > they separate per column constraints or are they multi-column constraints? here are the constraints of the abilitazione table ALTER TABLE public.abilitazione ADD CONSTRAINT

[SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Michele Bendazzoli
I have found a strange behaviour that I don't know if is a bug or not. I have three tables: * abilitazione with a primary key of (comuneid, cassonettoid, chiaveid) * cassonetto with a primary key of (comuneid, cassonettoid) * chiave with a primary key of (comuneid, chiaveid) and two foreign key

Re: [SQL] [ZODB-Dev] What are the ZopeDB limit?

2003-08-26 Thread Michele Bendazzoli
On Tue, 2003-08-26 at 08:50, BenLaKnet wrote: > just one question > > You use zope with postgresql ?? yes. > No problem of connection ? Until now no. I use debian unstable. ciao, Michele ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

Re: [SQL] [ZODB-Dev] What are the ZopeDB limit?

2003-08-25 Thread Michele Bendazzoli
On Mon, 2003-08-25 at 09:12, Michele Bendazzoli wrote: ops ... apologies for the message. Michele ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] [ZODB-Dev] What are the ZopeDB limit?

2003-08-25 Thread Michele Bendazzoli
On Sat, 2003-08-23 at 23:01, Dieter Maurer wrote: cut > > What do you think of? > > When your data fits well in a relational database > (a huge number of highly structured records, no full text indexes), > put it in Postgres. Otherwise, try the ZODB. > Make some preliminary mass tests before your

Re: [SQL] Bug on parameter bigint in PL/PGSQL

2003-08-22 Thread Michele Bendazzoli
On Fri, 2003-08-22 at 15:05, Richard Huxton wrote: > On Friday 22 August 2003 12:59, Michele Bendazzoli wrote: > > I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8) > > and call the function from psql an error message which says that "the > > functio

[SQL] Bug on parameter bigint in PL/PGSQL

2003-08-22 Thread Michele Bendazzoli
I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8) and call the function from psql an error message which says that "the functioname(bigint) doesn't exist" is displayed. If i turn the int8 to int4 all works fine ... Now i use two int4 instead of one int8: is advisable? ciao,