Regression: time of parsing of huge IN-list (or searching inside it?) in 3.0 
much greater than in 2.5.x
-------------------------------------------------------------------------------------------------------

                 Key: CORE-4728
                 URL: http://tracker.firebirdsql.org/browse/CORE-4728
             Project: Firebird Core
          Issue Type: Bug
            Reporter: Pavel Zotov
         Attachments: inlist_1500_elements.zip

The following batch will generate script with list of 1500 literals for testing 
of performance  of:

SELECT 1 FROM RDB$DATABASE WHERE :n IN ( <this_huge_list> ):

@echo off
setlocal enabledelayedexpansion enableextensions
set sql=inlist.sql
del %sql% 2>nul
set n=1500
echo show version;>>%sql%
echo set stat on;>>%sql%
echo select 1 from>>%sql%
echo rdb$database where %n% in(>>%sql%
set /a k=2147483647
set str=(
for /l %%i in (1, 1, %n%) do ( 
  echo !k!
  if .%%i.==.1. (
     echo !k!>>%sql%
  ) else (
     if .%%i.==.%n%. (
        echo ,%n%>>%sql%
     ) else (
        echo ,!k!>>%sql%
     )
  )
  set /a k=!k!-1
)
echo );>>%sql%

(script can be taken also from attached .zip)

Results in 3.0 and old 2.5.0:

ISQL Version: WI-T3.0.0.31756 Firebird 3.0 Beta 2
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-T3.0.0.31756 Firebird 
3.0 Beta 2"
Firebird/Windows/Intel/i386 (remote server), version "WI-T3.0.0.31756 Firebird 
3.0 Beta 2/tcp (csprog)/P13"
Firebird/Windows/Intel/i386 (remote interface), version "WI-T3.0.0.31756 
Firebird 3.0 Beta 2/tcp (csprog)/P13"
on disk structure version 12.0

    CONSTANT
============
           1

Current memory = 94624048
Delta memory = 57537952
Max memory = 94692960
Elapsed time= 0.794 sec
Buffers = 8192
Reads = 1
Writes = 0
Fetches = 12

=== vs ===

ISQL Version: WI-V2.5.0.26074 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.0.26074 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.0.26074 Firebird 
2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.0.26074 Firebird 
2.5/tcp (csprog)/P12"
on disk structure version 11.2

    CONSTANT
============
           1

Current memory = 36255732
Delta memory = 727292
Max memory = 36314920
Elapsed time= 0.02 sec
Buffers = 8192
Reads = 17
Writes 0
Fetches = 263

Why the elapsed time in 3.0 is more than 100x worse than in 2.5.x ?

-- 
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

        

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to