Subject Re: rdb$procedure_parameters non index read
Author ma_golyo
Currently the non index read count is over 30K, and this is just a simle
(few database object) test case.
Index reads means less record read -> less I/O -> faster execution.

Query
------------------------------------------------
execute procedure dbschema_vc

Plan
------------------------------------------------


Query Time
------------------------------------------------
Prepare : 47,00 ms
Execute : 11 766,00 ms
Avg fetch time: 0,00 ms

Memory
------------------------------------------------
Current: 13 299 512
Max : 13 357 248
Buffers: 90

Operations
------------------------------------------------
Read : 3 879
Writes : 9 742
Fetches: 416 703


Enchanced Info:
+--------------------------+-----------+-----------+-------------+------\
---+---------+---------+
| Table Name | Records | Indexed | Non-Indexed |
Updates | Deletes | Inserts |
| | Total | reads | reads |
| | |
+--------------------------+-----------+-----------+-------------+------\
---+---------+---------+
| DBSCHEMA_CHECK| 0 | 1 | 0 |
0 | 0 | 0 |
| DBSCHEMA_DBTRIGGER| 0 | 4 | 0 |
0 | 0 | 0 |
| DBSCHEMA_DOMAIN| 0 | 282 | 0 |
1 | 0 | 0 |
| DBSCHEMA_EXCEPTION| 0 | 2 | 0 |
0 | 0 | 0 |
| DBSCHEMA_FOREIGNKEY| 0 | 8 | 0 |
0 | 0 | 0 |
| DBSCHEMA_INDEX| 0 | 2 | 0 |
0 | 0 | 0 |
| DBSCHEMA_PREFERENCES| 0 | 9 | 0 |
0 | 0 | 0 |
| DBSCHEMA_PRIMARYKEY| 0 | 25 | 0 |
0 | 0 | 0 |
|DBSCHEMA_PRIMARYKEY_FIELDS| 0 | 4 | 0 |
0 | 0 | 0 |
| DBSCHEMA_SEQUENCE| 0 | 3 | 0 |
0 | 0 | 0 |
|DBSCHEMA_SQLCOMMAND_ARCHIV| 0 | 867 | 0 |
434 | 0 | 434 |
| DBSCHEMA_SQLSCRIPT| 0 | 1 | 0 |
0 | 0 | 0 |
| DBSCHEMA_STOREDPROC| 0 | 12 | 0 |
0 | 0 | 0 |
| DBSCHEMA_TABLE| 0 | 998 | 0 |
0 | 0 | 8 |
| DBSCHEMA_TABLEFIELD| 0 | 2243 | 0 |
0 | 0 | 6 |
| DBSCHEMA_TABLETRIGGER| 0 | 54 | 0 |
0 | 0 | 26 |
| DBSCHEMA_TABLE_RECORD| 0 | 6 | 0 |
0 | 0 | 0 |
|DBSCHEMA_TABLE_RECORD_FIEL| 0 | 91 | 0 |
0 | 0 | 0 |
| DBSCHEMA_UDF| 0 | 2 | 0 |
0 | 0 | 0 |
| DBSCHEMA_UNIQUEKEY| 0 | 29 | 0 |
0 | 0 | 0 |
| DBSCHEMA_UNIQUEKEY_FIELDS| 0 | 30 | 0 |
0 | 0 | 0 |
| DBSCHEMA_VERSION| 0 | 435 | 0 |
0 | 0 | 0 |
| DBSCHEMA_VIEW| 0 | 85 | 0 |
0 | 0 | 19 |
| DBSCHEMA_VIEWTRIGGER| 0 | 40 | 0 |
0 | 0 | 19 |
| GLB_MODULE_I_T| 0 | 0 | 0 |
0 | 0 | 1 |
| GLB_MODULE_T| 0 | 0 | 0 |
0 | 0 | 1 |
| RDB$CHARACTER_SETS| 0 | 199 | 0 |
0 | 0 | 0 |
| RDB$CHECK_CONSTRAINTS| 0 | 0 | 0 |
0 | 0 | 2 |
| RDB$COLLATIONS| 0 | 199 | 0 |
0 | 0 | 0 |
| RDB$DATABASE| 0 | 0 | 116 |
37 | 0 | 0 |
| RDB$DEPENDENCIES| 0 | 30006 | 0 |
0 | 1092 | 2074 |
| RDB$EXCEPTIONS| 0 | 324 | 0 |
0 | 0 | 2 |
| RDB$FIELDS| 0 | 4458 | 0 |
7 | 231 | 257 |
| RDB$FORMATS| 0 | 0 | 0 |
0 | 0 | 58 |
| RDB$FUNCTIONS| 0 | 2 | 0 |
0 | 0 | 2 |
| RDB$FUNCTION_ARGUMENTS| 0 | 6 | 0 |
0 | 0 | 4 |
| RDB$GENERATORS| 0 | 102 | 0 |
0 | 0 | 3 |
| RDB$INDEX_SEGMENTS| 0 | 749 | 0 |
325 | 0 | 38 |
| RDB$INDICES| 0 | 2257 | 185 |
496 | 0 | 32 |
| RDB$PAGES| 0 | 0 | 0 |
0 | 0 | 32 |
| RDB$PROCEDURES| 0 | 90 | 0 |
12 | 0 | 4 |
| RDB$PROCEDURE_PARAMETERS| 0 | 98 | 32571 |
9 | 1 | 9 |
| RDB$REF_CONSTRAINTS| 0 | 0 | 0 |
0 | 0 | 10 |
| RDB$RELATIONS| 0 | 4656 | 0 |
359 | 0 | 37 |
| RDB$RELATION_CONSTRAINTS| 0 | 773 | 3870 |
0 | 0 | 31 |
| RDB$RELATION_FIELDS| 0 | 5395 | 0 |
835 | 0 | 373 |
| RDB$SECURITY_CLASSES| 0 | 47 | 0 |
0 | 0 | 78 |
| RDB$TRIGGERS| 0 | 1148 | 0 |
88 | 0 | 60 |
| RDB$USER_PRIVILEGES| 0 | 374 | 0 |
0 | 0 | 189 |
| RDB$VIEW_RELATIONS| 0 | 599 | 0 |
0 | 21 | 48 |
+--------------------------+-----------+-----------+-------------+------\
---+---------+---------+

--- In firebird-support@yahoogroups.com, Dmitry Yemanov <dimitr@...>
wrote:
>
> 09.01.2012 20:53, ma_golyo wrote:
> >
> > I'm analysing my stored procedure run with IBExpert, and I can't
figure
> > out what can cause rdb$procedure_parameters non index reads.
> >
> > facts :
> > - procedure do not read rdb$procedure_parameters directly
> > - procedure creates and alters procedures, view, triggers (via
execute
> > statement in autonomous transaction)
> >
> > It looks like, that firebird inner engine does something wrong, and
do
> > not user index (missing index or wrong select?).
>
> Does it cause you any real issues?
>
>
> Dmitry
>



[Non-text portions of this message have been removed]