Number of indexed reads differ from expected and depends (only in 2.5) on 
presence of trace session
---------------------------------------------------------------------------------------------------

                 Key: CORE-4797
                 URL: http://tracker.firebirdsql.org/browse/CORE-4797
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine, TRACEMGR
    Affects Versions: 3.0 Beta 2, 2.5.5
            Reporter: Pavel Zotov
            Priority: Minor


Following was done each run on empty database, page = 4k, FW = ON.

DDL:
====

create or alter view vmon as
select r.mon$record_seq_reads seq_reads,r.mon$record_idx_reads idx_reads
from mon$attachments a left join mon$record_stats r on 
a.mon$stat_id=r.mon$stat_id
where a.mon$attachment_id = current_connection;
commit;
recreate table test(x int);
commit;
insert into test select rand()*100 from (select 1 i from rdb$types rows 100) a, 
(select 1 i from rdb$types rows 100) b;
commit;
create index test_x on test(x);
commit; ------------------------------- [1]


TEST-1. Without trace.
======

select * from vmon; ----------------------- [a]
out nul; select min(x) from test; out;
commit;
select * from vmon; ----------------------- [b]

Result in 2.5:
~~~~~~~~~~

SEQ_READS             IDX_READS
========= =====================
    10173                   382

SEQ_READS             IDX_READS
========= =====================
    10173                   385

Difference of values in IDX_READS column is 385 - 382 = 3 rather than expected 
1 (one). 
The same result will be for: select x from test order by x rows 1;

Result in 3.0:
~~~~~~~~~~
SEQ_READS             IDX_READS
========= =====================
    10178                   355

SEQ_READS             IDX_READS
========= =====================
    10178                   357

Difference of values in IDX_READS column is 357 - 355 = 2 rather than expected 
1 (one). 
The same result will be for: select x from test order by x rows 1;


TEST-2. WITH trace launching after "commit; --------- [1]" and before first 
subsequent query to view "vmon".
======

select * from vmon; ----------------------- [a] -- this should be issued AFTER 
trace session will launched in another window
out nul; select min(x) from test; out;
commit;
select * from vmon; ----------------------- [b]


Result in 2.5:
~~~~~~~~~~
 SEQ_READS             IDX_READS
========== =====================
     10173                   382

 SEQ_READS             IDX_READS
========== =====================
     10173                   386

Difference of values in IDX_READS column is 386 - 382 = 4 rather than expected 
1 (one). And this value differ from 3 that was received before, without trace. 

Result in 3.0: the same as before, difference is 2 rather than 1. Trace has no 
affect on this.
~~~~~~~~~~

Q1: why differences in IDX_READS column never was 1 ?
Q2: how TRACE session could affect on result of gathering statistics in 
MON$RECORD_STATS in 2.5 ?!

PS. Tested on:  WI-V2.5.5.26870 and WI-T3.0.0.31836, both - SuperClassic.

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

        

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to