Very poor performance of SIMILAR TO on some arguments + unable to disconnect via DELETE FROM MON$ATTACHMENTS [CORE3858] #4198
Submitted by: @pavel-zotov
Relate to CORE4810
C:\MIX\firebird\fb25>bin\isql -n -c 2048 localhost/3050:C:\MIX\firebird\fb25\T1.FDB
SQL> select iif('sdf--asdf_sd.dsfsfh-.sdjskdjfh-_.' SIMILAR TO '(([[:ALNUM:]\_\-])+.?)+([[:ALNUM:]\_\-])+' escape '\', 1, 0) from rdb$database;
-- This query will run about 9 minutes.
The text was updated successfully, but these errors were encountered:
Commented by: @pavel-zotov
One more sample.
set list on;
select 1 from rdb$database where
NOTE on this part of pattern:
It is underscore character that is "reason" of very poor performance.