> Hi Vlad,
> 
>>> as the subject says. What's the unit for the resulting values for number
>>> of reads, writes, fetches, marks? Just want to be sure if a particular
>>> result makes sense here. ;-)
>>
>>      Same as for isql's statistics - number of operations. Note, we have no
>> operations on group of pages, so, for ex. N writes means N times write
>> and every write is length of one page.
> 
> So, the numbers I see is number of pages?

    Yes
 
> I have the following trace output for a select count(*) on a table with 
> ~100.000 records.
> 
> -------------------------------------------------------------------------------
> select count(*) from accommodation
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> PLAN (ACCOMMODATION NATURAL)
> 1 records fetched
>      81 ms, 7149 read(s), 214192 fetch(es)
> 
> 
> If it is pages, then this would mean ~ 800MB (4K page size) fetched 
> from the cache? Does this make sense?

    Fetch is not a physical read. This is more like reference. When Firebird 
need 
access to page buffer (to get record, for ex.) it asks page cache to "fetch" 
page
buffer. If this buffer is not present at page cache, it will be read from disk 
first.

    In your example we see 7149 physical reads and 214192 times this pages was 
referenced by the engine. To read a record engine needs to access pointer page 
and 
(at least one) data page. You have ~100K records so we can explain ~200K 
fetches. 

Regards,
Vlad

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to