Hi,
I have a query similar to this one:
select person.name, person.surname, ... ... from Entity e inner join e.person person inner join person.address address left join address.place addressPlace left join address.city addressCity left join address.county addressCounty left join person.birthPlace birthPlace left join person.birthCounty birthCounty left join person.citizenship citizenship left join e.codeList1 codeList1 left join e.codeList2 codeList2 left join e.codeList3 codeList3 left join e.codeList4 codeList4 left join e.codeList5 codeList5
All of the codeLists can be null for an Entity, and there is only on Entity in the database.
Execution of this query (running with ObjectDB) takes about 10-12 seconds.
If i remove ANY 5 left joins, query execution time drops to about 50 milliseconds.
Adding a new left join on remaining 8 slows down query execution time drastically.
Please help me with this one,
Thanks!