db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Static SQl in Derby
Date Fri, 03 Aug 2007 17:39:26 GMT
> With dynamic SQL, database access and authorization are determined at 
> run time. The user of the application must have all required database 
> privileges, and the database must determine the best way to access the 
> required data at run time. However, with static SQL, access and 
> authorization are determined at customization and bind time. 

I think Derby is somewhere in between these two. The SQL statements
are parsed, compiled, and optimized at runtime, in a dynamic fashion.

However, the database engine automatically maintains a cache of
compiled statements, and a re-preparation of a SQL statement simply
retrieves the already-compiled statement information from the cache
for execution.

So Derby achieves the flexibility and adaptability of the dynamic
approach, but it also realizes substantial performance benefits by
caching the results of the statement bind process and re-using them
wherever possible.

thanks,

bryan


Mime
View raw message