Icon View Incident Report

Serious Serious
Reported By: Krisztian Kepes
Reported On: 6/27/2014
For: Version 2.17 Build 1
# 4105 Join Optimizer Not Selecting Optimal Join Orders Based Upon Available Indexes

I have found some "strange" thing in ElevateDB's query optimization. This statement is running for 48 seconds. It's very slow. As I checked the the problem caused by missing index on taska.userkod.

Because the optimizer re-optimize the result, it choose user table (lowest recordcount) for driver table which cause unacceptable speed because of missing index.

select taska.taskaszam, taska.rendszam, cast(szallit.raklapjel as Varchar(50)) as raklapjel,
szallit.*,
SUBSTRING(partner.company from 1 for 10)+ ' ][ ' + taska.cim as cim, taska.userkod, taska.terv,
taska.problema, taska.lezartdiszpo, partner.engedely, taska.partner, auto.nev as autonev, user.nev as usernev,
taska.szallproblema, taska.szallmemo
from szallit
inner join taska on taska.szam=szallit.taskaszam
inner join user on taska.userkod=user.kod
inner join partner on taska.partner=partner.code
left join auto on auto.kod=szallit.autokod
where 
not (szallit.ok)
and
not (szallit.sajat)
and 
(szallit.pld>0)
order by szallit.datum, szallit.ido



Resolution Resolution
Fixed Problem on 7/10/2014 in version 2.18 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image