Execution of multiple stored procedures in some case is slow
------------------------------------------------------------

                 Key: CORE-5782
                 URL: http://tracker.firebirdsql.org/browse/CORE-5782
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.3, 3.0.4
            Reporter: Karol Bieniaszewski


We are in point of migration of database from Interbase to Firebird and 
encountered slownes.
Below query run slow ~1s. With same shema this query run instant on Interbase.
We have analysed all procedures execution one by one and all looks fast with 
good plans.
But as whole it is slow compared to Interbase.
SELECT
        D.DYR_ID
        , D.DYR_NAZWA
        , D2.DYR_ID AS MA_DYR_UPR
FROM
        DYREKCJA D
        LEFT JOIN Pracownik_dyr_akcja(49, 0, 'ARozrachunkiKsiegowane', '') D2 
ON D2.DYR_ID = D.DYR_ID
WHERE
        D.OBSZAR_ID = 1
        AND D.DYR_ID <> 0
ORDER BY
        D.DYR_NAZWA COLLATE PXW_PLK ASC


one point in comparision is that Firebird for above query use
PLAN SORT (JOIN (D INDEX (FK_DYREKCJA__OBSZAR), D2 NATURAL))
but Interbase 
PLAN SORT (MERGE (SORT (D INDEX (RDB$FOREIGN323)),SORT ()))

on Firebird there are 561598 fetches
when on Interbase there is only 30199 fetches

I have attached difference with stats and sample database to test


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to