Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very poor "similar to" performance [CORE5854] #6114

Closed
firebird-automations opened this issue Jun 21, 2018 · 5 comments
Closed

Very poor "similar to" performance [CORE5854] #6114

firebird-automations opened this issue Jun 21, 2018 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Sergey Borisov (bsv)

Duplicates CORE5664

--This simple query take more than 16 secs of execution:
select iif ('abc.abc' similar to '[[:ALPHA:].]{1,60}.ab' ,1,0) is_similar from rdb$database

--Then add one more symbol to text, and execution take more then 2 MINUTES!!!
select iif ('abcd.abc' similar to '[[:ALPHA:].]{1,60}.ab' ,1,0) is_similar from rdb$database

If the test string is even longer than 4 symbols, then the server hangs forever!

@firebird-automations
Copy link
Collaborator Author

Commented by: Sergey Borisov (bsv)

The same geometric growth of time execution can be obtained by increasing the maximum number of symbols in regexp: {1,60}, {1,80}, {1,100}, etc.
So, this query take more then 2 minutes:
select iif ('abc.abc' similar to '[[:ALPHA:].]{1,80}.ab' ,1,0) is_similar from rdb$database

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue duplicates CORE5664 [ CORE5664 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant