Issue Details (XML | Word | Printable)

Key: CORE-2411
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Dmitry Yemanov
Reporter: Dejan Schild
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Optimizer chooses slower PLAN in v2.0.5/v2.1.2 than in v2.0.4/v2.1.1

Created: 08/Apr/09 04:33 AM   Updated: 31/May/11 01:25 PM
Component/s: Engine
Affects Version/s: 2.0.5, 2.1.2
Fix Version/s: 2.5 Beta 2, 2.1.3, 2.0.6

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive DEBUG.zip (1.55 MB)

Environment: Tested on Windows XP32, Vista 64 and Suse64.
Issue Links:
Relate

Planning Status: Unspecified


 Description  « Hide
In FB 2.1.2, with some queries I got much slower execution than with 2.1.1. After some investigation, I found that optimizer choose different plan, that is up to 4x slower. I made test database, and here is simple test statement. Maybe something with CORE-2078?

select d.uid
from promene_doc p
  inner join dokumenti d on (p.prom_uid = d.uid)
  inner join tipovi_vrste v on (v.tipvrsta=d.tipvrsta)
where (d.op=2) and (d.stornodok=0)

-- fast 2.1.1 --PLAN JOIN (P NATURAL, D INDEX (DOKUMENTI_PK), V INDEX (TIPOVI_VRSTE_PK))
-- slow 2.1.2 --PLAN JOIN (V NATURAL, D INDEX (FK_DOK_TIPVRSTA), P INDEX (PK_PROMENE_DOC))

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dejan Schild added a comment - 08/Apr/09 04:34 AM
Test database

Dmitry Yemanov added a comment - 14/May/09 07:23 PM
This issue should be fixed now. You may test it with the next (tomorrow's) snapshot builds.