Too many fetches on some patterns with STARTING WITH
-----------------------------------------------------
Key: CORE-3840
URL: http://tracker.firebirdsql.org/browse/CORE-3840
Project: Firebird Core
Issue Type: Bug
Components: Charsets/Collation
Affects Versions: 2.5.2
Environment: win 2003, win xp sp2
Reporter: Alexander Sumskiy
SET NAMES UTF8;
CREATE DATABASE 'localhost:testdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 4096
DEFAULT CHARACTER SET UTF8 COLLATION UTF8;
CREATE TABLE test (
id INTEGER NOT NULL,
terms VARCHAR(20) NOT NULL COLLATE UNICODE_CI
);
INSERT INTO test (id, terms) VALUES (1, 'ааа');
INSERT INTO test (id, terms) VALUES (2, 'абб');
INSERT INTO test (id, terms) VALUES (3, 'асс');
INSERT INTO test (id, terms) VALUES (4, 'абс');
INSERT INTO test (id, terms) VALUES (5, 'www');
INSERT INTO test (id, terms) VALUES (6, 'wee');
INSERT INTO test (id, terms) VALUES (7, 'wwe');
COMMIT WORK;
ALTER TABLE test ADD CONSTRAINT pktest PRIMARY KEY (id);
CREATE UNIQUE INDEX itest_term ON test (terms);
Query 1 (several russian letters):
select * from test t where t.terms STARTING WITH 'аб'
PLAN (T INDEX (itest_term))
------ Performance info ------
Prepare time = 15ms
Execute time = 0ms
Avg fetch time = 0.00 ms
Current memory = 9 597 788
Max memory = 9 921 956
Memory buffers = 2 048
Reads from disk to cache = 0
Writes from cache to disk = 0
Fetches from cache = 9
Query 2 (one letter):
select * from test t where t.terms STARTING WITH 'а'
PLAN (T INDEX (itest_term))
------ Performance info ------
Prepare time = 0ms
Execute time = 0ms
Avg fetch time = 0.00 ms
Current memory = 9 598 272
Max memory = 9 921 956
Memory buffers = 2 048
Reads from disk to cache = 0
Writes from cache to disk = 0
Fetches from cache = 19
--
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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel