Hi markus,
About, the fact that libdbi has to know the number of rows in resultset
before fetching data :
* Oracle 8i can't do it. So Oracle 8i won't be supported. Even if Oracle 8i
is nor even supported anymore by Oracle (except for some big clients),
Oracle is still widely used...
* Oracle 9i can handle it but it will affect performances
But let's forget Oracle case for now. If you've got a big resultset (let's
say 1.000.000 rows) that has 20 columns with some string based columns
(let's say 3.000 bytes per row).
Actual implementation of libdbi allocates memory for all resultset rows.
With this example, it makes 3Go that have to be allocated !!! Just to fetch
a query... with ocilib, for example, by default, only 60Ko would be
allocated...
I think preallocating space for all resultset rows is a constraint when
dealing with big resultset and whatever is the database server, libdbi would
get better performances if you could handle differently.
The ocilib based libdbi oracle drivers is now done and i'm making the last
tests.
For the cleanup function, it's not an oligation but would be nice ! At the
moment i hold a counter to call the initialization and cleanup functions in
the libdbi connect and disconnect functions.
I'll have a look at the new test case.
Vincent.
2008/10/16 Markus Hoenicka [EMAIL PROTECTED]
[I've cc'ed the list as other Oracle users may be interested - please send
your replies to the list too]
Quoting vincent rogier [EMAIL PROTECTED]:
hi,
just to let you know that the current oracle can't even compile !! a
variable not declared in dbd_oracle, line 866.. it can fixed just by
returning directly the result of mktime()...
Once again, unfortunately I can't even compile the driver as I don't have
the oracle libs installed.
I think you rellay should think about doing something for the number or
row
problem... Because it not only a problem for oracle but as well for
firebird
and other sgdb...
I'm open to creative solutions for this problem. I can't think of one right
now.
For oracle, we can handle that limitation only for Oracle = Oracle 9i but
the performance will decreased
Isn't 10 the current version? If yes, I wouldn't favour rewriting libdbi in
order to support Oracle's next-to-last release.
Another thing.. libdbi has dbd_initialize() but i did'nt find a
finalization/cleanup function... why ?
For ocilib, i have a OCI_Initiliaze() and OCI_Clean() if libdbi does
not
have a cleanup function, it means the driver wil initialize ocilib at
every
connection and cleanup at every disconnection.. hum. not really
optimized...
I suspect that none of the other client libraries has any need for cleanup.
Afaik this is at least the case for mysql, pgsql, sqlite, and firebird. If
an ocilib-based driver needs a cleanup function, we can easily retrofit one
for the next major (that is, with API changes) release. This would then be a
dummy function for all other drivers. The best place to call this cleanup
function is probably when you shut down an instance (or libdbi when using
the old interface), as libdbi unloads all drivers in turn anyway.
regards,
Markus
--
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with mhoenicka)
http://www.mhoenicka.de
--
Vincent Rogier
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel