6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Added/Updated tests\bugs\gh_3810_test.py: Removed usage of index test_fld2 after discuss with Anton Zuev (Red Soft) and dimitr

This commit is contained in:
pavel-zotov 2023-09-22 20:19:43 +03:00
parent d79fe4f174
commit f807b16334

View File

@ -8,6 +8,11 @@ NOTES:
[14.04.2023] pzotov
Confirmed poor performance on 3.0.11.33678 (num of fetches = 10'099).
Checked on 3.0.11.33681 -- all fine, fetches differ for less than 20.
[22.09.2023] pzotov
Changed name of table to simpler.
Removed usage of index test_fld2 after discuss with Anton Zuev (Red Soft) and dimitr,
see: https://github.com/FirebirdSQL/firebird-qa/pull/19
"""
import pytest
@ -17,9 +22,9 @@ db = db_factory()
test_script = """
set bail on;
create table tmp_tbl1 (fld1 integer, fld2 integer, fld3 integer);
create index tmp_tbl1_fld123 on tmp_tbl1(fld1, fld2, fld3);
create index tmp_tbl1_fld2 on tmp_tbl1(fld2);
create table test (fld1 integer, fld2 integer, fld3 integer);
create index test_fld123 on test(fld1, fld2, fld3);
-- create index test_fld2 on test(fld2);
commit;
set term ^;
create or alter procedure tmp_sp1 as
@ -28,7 +33,7 @@ test_script = """
i=0;
while ( i < 10000 ) do begin
i=i+1;
insert into tmp_tbl1 values (1, :i, 2);
insert into test values (1, :i, 2);
end
end
^
@ -36,8 +41,8 @@ test_script = """
commit;
execute procedure tmp_sp1;
commit;
SET STATISTICS INDEX TMP_TBL1_FLD123;
SET STATISTICS INDEX TMP_TBL1_FLD2;
SET STATISTICS INDEX test_fld123;
-- SET STATISTICS INDEX test_FLD2;
commit;
recreate view v_check as
@ -58,7 +63,7 @@ test_script = """
^
set plan on
^
select count(*) from tmp_tbl1 where fld1=1 and fld2 is null
select count(*) from test where fld1=1 and fld2 is null
^
set plan off
^
@ -93,7 +98,7 @@ test_script = """
act = isql_act('db', test_script)
expected_stdout = """
PLAN (TMP_TBL1 INDEX (TMP_TBL1_FLD123))
PLAN (TEST INDEX (TEST_FLD123))
COUNT 0
FETCHES_DIFF OK, expected
"""