suche 36x36
  • Admin-Scout-small-Banner
           

    CURSOR Admin-Scout

    get the ultimate tool for Informix

    pfeil  
Latest versionsfixlist
14.10.xC10 FixList
12.10.xC16.X5 FixList
11.70.xC9.XB FixList
11.50.xC9.X2 FixList
11.10.xC3.W5 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

Informix - Problem description

Problem IT26946 Status: Closed

HASH JOIN IS USED EVEN WHEN NESTED LOOP JOIN IS FASTER

product:
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10
Problem description:
Costs for hash join are slightly less  but
execution time for nested loop join is better.

Query is:

SELECT   .....
FROM  tab1 , tab2
WHERE tab1.c1 = tab2.c1
and ...

Both table have a primary key constraint on c1.

"slow" plan:

  1) informix.tab1: SEQUENTIAL SCAN
  2) informix.tab2: SEQUENTIAL SCAN
DYNAMIC HASH JOIN
    Dynamic Hash Filters: informix.tab1.c1 = informix.tab2.c2

"fast" plan:

  1) informix.tab1: SEQUENTIAL SCAN
  2) informix.tab2: INDEX PATH

    (1) Index Name: informix. 100_1
        Index Keys: c1   (Serial, fragments: ALL)
        Lower Index Filter: informix.tab1.c1 = informix.tab2.c1
NESTED LOOP JOIN
Problem Summary:
Local Fix:
Solution
Workaround
not known / see Local fix
Comment
The value of (DS_TOTAL_MEMORY/DS_MAX_QUERIES) can affect both
hash join and index scan cost calculation.  Based on testing
(with the case key length and fullness listed below) set
DS_TOTAL_MEMORY/DS_MAX_QUERIES more than

Pagesize    Keys per node (Len = 4, fullness=0.75)
DS_TOTAL_MEMARY/DS_MAX_QUERIES
16K          16K*0.75/(8+4)=1024                            32 *
1024
8K            8K*0.75/(8+4)  = 512                             8
* 1024
4K            4K*0.75/(8+4) = 256
n/a (internal default minimum can handle correctly)
2K            2K*0.75/(8+4) = 128
n/a (internal default minimum can handle correctly)
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
13.11.2018
04.12.2019
04.12.2019
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
Informix EditionsInformix Editions
Informix Editions
DocumentationDocumentation
Documentation
IBM NewsletterIBM Newsletter
IBM Newsletter
Current BugsCurrent Bugs
Current Bugs
Bug ResearchBug Research
Bug Research
Bug FixlistsBug Fixlists
Bug Fixlists
Release NotesRelease Notes
Release Notes
Machine NotesMachine Notes
Machine Notes
Release NewsRelease News
Release News
Product LifecycleProduct Lifecycle
Lifecycle
Media DownloadMedia Download
Media Download