db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Andrews <...@xoba.com>
Subject optimizer seems to get confused by trivial table views
Date Sat, 28 Nov 2009 17:24:04 GMT
dear derby developers,

i've got two tables that i join and get good performance with, based
on the indicies i've created.

but when i create trivial views on those tables and join with those
views instead, performance is bad and optimizer seems to choose a
suboptimal plan.

by "trivial views" i mean views that just refer to a subset of a
single table's columns, and sometime rename columns, but that's all.

please see attached "sql.txt" for the precise sequence of sql
statements that results in this behaviour, as well as a portion of the
derby.log file showing the optimizer choosing a sub-optimal plan.

do you think this is a bug? or am i doing something incorrectly?

best regards,

View raw message