[Opa] working with databases

Sam Stainsby sam at sustainablesoftware.com.au
Wed Sep 21 04:44:31 EDT 2011


On 20/09/11 20:41, Adam Koprowski wrote:

> ppl_at_90021 =
>   is_at_90021(p) = if p.zip == "90021" then some("{p.firstname}
> {p.lastname}") else none
>   Map.filter_map(is_at_90021, /person) 

Is this optimised to avoid pulling every record out of the database
before applying the filter? For comparison, Db4o, an embedded object
database for Java, does some clever optimisations for simple "native"
queries such as this, so that only the indices are hit during the query.
You can configure Db4o to warn you if a more complex query is cannot be
optimised, because that could result in vastly slower query times. I'm
wondering what the Opa database does in this area, if anything.

Cheers,
Sam.
-- 
Sam Stainsby  -  Managing Director
Sustainable Software Pty Ltd
"open knowledge :: social conscience"
http://sustainablesoftware.com.au/
ABN: 32 117 186 286
E-mail: sam at sustainablesoftware.com.au
Phone: (07) 32895491   Mob: 0401131229


More information about the Opa mailing list