Skip to content

The access path information is truncated to 255 characters in the PLG$PROF_RECORD_SOURCES table. #7752

@sim1984

Description

@sim1984

Environment:
ISQL Version: WI-V5.0.0.1219 Firebird 5.0 Release Candidate 1
Server version:
Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V5.0.0.1219 Firebird 5.0 Release Candidate 1"
Firebird/Windows/AMD/Intel/x64 (remote server), version "WI-V5.0.0.1219 Firebird 5.0 Release Candidate 1/tcp (station9)/P18:C"
Firebird/Windows/AMD/Intel/x64 (remote interface), version "WI-V5.0.0.1219 Firebird 5.0 Release Candidate 1/tcp (station9)/P18:C"
on disk structure version 13.1

For SQL queries where Bitmap Or or Bitmap And is present in the plan, information about the access method in the profiler is cut to 255 characters.

Example:

SELECT COUNT(*)
FROM RDB$RELATIONS R
WHERE 
  (R.RDB$RELATION_NAME = 'RDB$RELATIONS') OR
  (R.RDB$RELATION_NAME = 'RDB$DATABASE') OR
  (R.RDB$RELATION_NAME = 'RDB$COLLATIONS') OR
  (R.RDB$RELATION_NAME = 'RDB$CONFIG') OR
  (R.RDB$RELATION_NAME = 'RDB$EXCEPTIONS') OR
  (R.RDB$RELATION_NAME = 'RDB$FIELDS') OR
  (R.RDB$RELATION_NAME = 'RDB$FUNCTIONS') OR
  (R.RDB$RELATION_NAME = 'RDB$PROCEDURES')

with plan:

Select Expression
    -> Aggregate
        -> Filter
            -> Table "RDB$RELATIONS" as "R" Access By ID
                -> Bitmap Or
                    -> Bitmap Or
                        -> Bitmap Or
                            -> Bitmap Or
                                -> Bitmap Or
                                    -> Bitmap Or
                                        -> Bitmap Or
                                            -> Bitmap
                                                -> Index "RDB$INDEX_0" Unique Scan
                                            -> Bitmap
                                                -> Index "RDB$INDEX_0" Unique Scan
                                        -> Bitmap
                                            -> Index "RDB$INDEX_0" Unique Scan
                                    -> Bitmap
                                        -> Index "RDB$INDEX_0" Unique Scan
                                -> Bitmap
                                    -> Index "RDB$INDEX_0" Unique Scan
                            -> Bitmap
                                -> Index "RDB$INDEX_0" Unique Scan
                        -> Bitmap
                            -> Index "RDB$INDEX_0" Unique Scan
                    -> Bitmap
                        -> Index "RDB$INDEX_0" Unique Scan

In ISQL we see the following:

SQL> set list on;
SQL> SELECT *
CON> FROM PLG$PROF_RECORD_SOURCES
CON> where statement_id = 8564;

PROFILE_ID                      2
STATEMENT_ID                    8564
CURSOR_ID                       1
RECORD_SOURCE_ID                1
PARENT_RECORD_SOURCE_ID         <null>
LEVEL                           0
ACCESS_PATH                     Select Expression

PROFILE_ID                      2
STATEMENT_ID                    8564
CURSOR_ID                       1
RECORD_SOURCE_ID                2
PARENT_RECORD_SOURCE_ID         1
LEVEL                           1
ACCESS_PATH                     -> Aggregate

PROFILE_ID                      2
STATEMENT_ID                    8564
CURSOR_ID                       1
RECORD_SOURCE_ID                3
PARENT_RECORD_SOURCE_ID         2
LEVEL                           2
ACCESS_PATH                     -> Filter

PROFILE_ID                      2
STATEMENT_ID                    8564
CURSOR_ID                       1
RECORD_SOURCE_ID                4
PARENT_RECORD_SOURCE_ID         3
LEVEL                           3
ACCESS_PATH                     -> Table "RDB$RELATIONS" as "R" Access By ID
    -> Bitmap Or
        -> Bitmap Or
            -> Bitmap Or
                -> Bitmap Or
                    -> Bitmap Or
                        -> Bitmap Or
                            -> Bitmap Or
    ...

This issue also came up in the discussion of #7675

There it was decided to replace the ACCESS_PATH type with BLOB SUB_TYPE TEXT. Maybe it’s worth doing the same in the profiler?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions