levente.meszaros at gmail.com
Tue Aug 26 10:03:09 UTC 2008
On Tue, Aug 26, 2008 at 11:02 AM, Leslie P. Polzer
<leslie.polzer at gmx.net> wrote:
> This global special doesn't cope well with multiple database
> initialization and scenarios where a database needs to be
> reinitialized because it was purged of all tables.
Well, this is a problem I see, BTW it also fails if there are any
errors during table creation and the transaction rolls back. I saw it
once if I remember correctly.
> Solution a) incurs a performance hit, but I'm not sure how
> severe it is.
Always checkint the existence in the DB is pretty slow, it's an extra
roundtrip which is nearly 1ms.
> Solution b) fixes the case of multiple databases
> that need to be initialized but doesn't solve the issue of
Reinitialization is not that important and if we provide a function
for that we can also clear the bits.
> Not sure about solution c). It's efficient and fixes
> both cases, but I'm not sure whether you like it
> because it produces db errors. Plus it might hide
> some unrelated errors...
I would like to avoid this one if possible.
The best would be not to select the oid at all. We could add it to the
insert using a stored procedure for that column which can handle the
missing case on the server pretty cheeply I guess. I don't know if
inserts can return anything, because the lisp vm needs to get the oid
back. So this might not work, but it would decrease the number of
commands for making an instance with 1. (and if we have time we could
even implement a single insert replace rule for multiple tables too,
so one instance could be 1 command)
We can customize the database in *database* and put the flag there.
This still does not solve the issue of reinitialization better than
the hashtable, but at least we don't need to look it up in hash-table
all the time. I don't remember if there is any support for that in
cl-rdbms or do we need to subclass or database types which would be
not that good.
Well, I'm still hesitating, any ideas ati?
There's no perfectoin
More information about the cl-perec-devel