Re: [PERFORM] Insert performance (OT?)

2005-08-17 Thread John A Meinel
Manfred Koizar wrote: > On Tue, 19 Jul 2005 11:51:51 +0100, Richard Huxton > wrote: > >>You could get away with one query if you converted them to left-joins: >>INSERT INTO ... >>SELECT * FROM upload LEFT JOIN ... WHERE f3 IS NULL >>UNION >>SELECT * FROM upload LEFT JOIN ... WHERE f4 IS NULL > > >

Re: [PERFORM] Insert performance (OT?)

2005-08-17 Thread Manfred Koizar
On Tue, 19 Jul 2005 11:51:51 +0100, Richard Huxton wrote: >You could get away with one query if you converted them to left-joins: >INSERT INTO ... >SELECT * FROM upload LEFT JOIN ... WHERE f3 IS NULL >UNION >SELECT * FROM upload LEFT JOIN ... WHERE f4 IS NULL For the archives: This won't work.

Re: [PERFORM] Insert performance (OT?)

2005-07-19 Thread Yves Vindevogel
I will use 2 queries. They run within a function fnUpload(), so I'm going to keep it simple. On 19 Jul 2005, at 12:51, Richard Huxton wrote: Yves Vindevogel wrote: >>> So, I must use a function that will check against u1 and u2, and then insert if it is ok. I know that such a function is way sl

Re: [PERFORM] Insert performance (OT?)

2005-07-19 Thread Richard Huxton
Yves Vindevogel wrote: >>> So, I must use a function that will check against u1 and u2, and then insert if it is ok. I know that such a function is way slower that my insert query. So - you have a table, called something like "upload" with 20,000 rows and you'd like to know whether it is safe

Fwd: [PERFORM] Insert performance (OT?)

2005-07-19 Thread Yves Vindevogel
BTW: thank you for the idea Begin forwarded message: From: Yves Vindevogel <[EMAIL PROTECTED]> Date: Tue 19 Jul 2005 12:20:34 CEST To: Richard Huxton Subject: Re: [PERFORM] Insert performance (OT?) On 19 Jul 2005, at 11:39, Richard Huxton wrote: Yves Vindevogel wrote: Hi, Suppose I

Re: [PERFORM] Insert performance (OT?)

2005-07-19 Thread Richard Huxton
Yves Vindevogel wrote: Hi, Suppose I have a table with 4 fields (f1, f2, f3, f4) I define 2 unique indexes u1 (f1, f2, f3) and u2 (f1, f2, f4) I have 3 records A, B, C, D (this will be inserted) A, B, C, E (this will pass u2, but not u1, thus not inserted) A, B, F, D (this will pass u1, but no

Re: [PERFORM] Insert performance (OT?)

2005-07-19 Thread Yves Vindevogel
nobody ? On 18 Jul 2005, at 21:29, Yves Vindevogel wrote: Hi, Suppose I have a table with 4 fields (f1, f2, f3, f4) I define 2 unique indexes u1 (f1, f2, f3) and u2 (f1, f2, f4) I have 3 records A, B, C, D (this will be inserted) A, B, C, E (this will pass u2, but not u1, thus not inserted) A,

[PERFORM] Insert performance (OT?)

2005-07-18 Thread Yves Vindevogel
Hi, Suppose I have a table with 4 fields (f1, f2, f3, f4) I define 2 unique indexes u1 (f1, f2, f3) and u2 (f1, f2, f4) I have 3 records A, B, C, D (this will be inserted) A, B, C, E (this will pass u2, but not u1, thus not inserted) A, B, F, D (this will pass u1, but not u2, thus not inserted)