[CDO] OCL Query to sql [message #988932] |
Mon, 03 December 2012 15:46  |
Eclipse User |
|
|
|
Hi, i'm trying to figure out if CDO suit my needs, and i have writ a simple test, for now the topic is Queries.
I really like the idea of using OCL as and abstracted language indipendent from the DBStore but when i have tryed to find the sqlQuery corresponding to my OCL query in the trace file i can't find it.
Now i have the doubt that OCL didn't convert to sql but instead load all objects in memory and apply the constraints. Am i right?
My OCL query was "Foo.allInstances()->select(f:Foo|f.xyz='test')" but in the trace file there is no a where clause with xyz = 'test' (or something like). At least...can't find it.
|
|
|
|
Re: [CDO] OCL Query to sql [message #989022 is a reply to message #988972] |
Tue, 04 December 2012 05:46  |
Eclipse User |
|
|
|
Hi
Istvan Rath has done performance benchmarks that demonstrate that
provided the server memory is large enough the direct OCL approach is an
order of magnitude faster than SQL.
http://www.eclipse.org/modeling/mdt/ocl/docs/publications/EclipseConEurope2012/FastQueries.pdf
slide 5 for a quick result. See Istvan's publications for extensive
results and descriptions.
Regards
Ed Willink
On 04/12/2012 06:31, Eike Stepper wrote:
> Am 03.12.2012 21:46, schrieb Michele Preti:
>> Hi, i'm trying to figure out if CDO suit my needs, and i have writ a
>> simple test, for now the topic is Queries.
>> I really like the idea of using OCL as and abstracted language
>> indipendent from the DBStore but when i have tryed to find the
>> sqlQuery corresponding to my OCL query in the trace file i can't find
>> it.
>>
>> Now i have the doubt that OCL didn't convert to sql but instead load
>> all objects in memory and apply the constraints. Am i right?
>>
>> My OCL query was "Foo.allInstances()->select(f:Foo|f.xyz='test')" but
>> in the trace file there is no a where clause with xyz = 'test' (or
>> something like). At least...can't find it.
> You're right, CDO does not translate OCL to SQL. It integrates with
> OCL at the "extents map" level, where it provides lazy extents.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04215 seconds