Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: S.O.D.A. database Query API - call for comments

Re: S.O.D.A. database Query API - call for comments

From: Carl Rosenberger <carl_at_db4o.com>
Date: Fri, 4 May 2001 16:23:40 +0200
Message-ID: <9cue2e$vgj$02$1@news.t-online.com>

Robert Sundström wrote:
> But, I have read some of the code of your benchmark and noticed that you
 have
> chosen to dynamically build _each_ SQL-statement and use JDBC-Statement
> objects for executing them. This is (just as you say) expensive. I would
 guess
> that a typical SQL-database will spend 90% of its time compiling and
> generating query plans for your statements.

Sorry for the simplicity of the benchmark. I know that the SQL part can be optimized for the specific task that is taking place. The 1000 runs try to simulate insert, update and retrieval of 1000 *different* objects.

> The idea of SQL to provide a generic, dynamic and easy to understand way
 of
> manipulating databases. SQL-statements *can* be compiled and executed
> dynamically, just as you do in your benchmark, but the preferred way is to
> compile the statements in advance using parameter markers and execute them
> multiple times.

O.K. we could add a prepared-statement version also, and compare performance.

On the other hand our engine also has a great disadvantage in the simple benchmark:
It stores an integer/String *plus* an object to carry it.

> Compare this to your object oriented database approach. When you have
 compiled
> your java database program, all possible database operations are set
> and defined at compile time. You will never dynamically construct and
 compile
> Java code!

No, we do not dynamically change Java code.

A side question:
Do OR-mappers typically use dynamic statements or prepared statements?

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Fri May 04 2001 - 09:23:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US