Subject Re: [firebird-support] Bad design causing problems
Author Woody
From: "Rik Barker" <rik.barker@...>
>
> Yep, critical sections are something I'm considering, but I'd hoped to
> avoid because of the bottleneck it will create on inserts. The example
> I've shown is one of 4 inserts done (all with preceding selects). 10
> threads all inserting at once is really pretty nippy. I'd hoped I could
> use the database to handle the de-duping so the app could run faster, but
I
> think my threads are so isolated (as they should be) that I'm suffering
the
> consequences.

In some cases, in order to ensure data accuracy, you have to give a little.
This might be one of those times. :)

> When I first wrote it as a stored procedure I thought it was quite a
clever
> approach. I was evaluating 3 different database engines, and learning SQL
> at the same time. I wanted my code to require as little change as
possible
> so it seemed sensible to put the database specifics in the database. From
> the disapproving looks and light chastisement I've been getting, I think I
> have some more reading to do. *8)

Can't tell you how many times my "clever" code had to be rewritten. :) It's
a process we all go through and a mighty good learning experience.

Woody (TMW)