24.04.2019 10:03, liviuslivius wrote:
i have looked at this simple explained plan and i see that from it i
cannot read simply that result set is sorted and retrived by index.
Select Expression
-> Nested Loop Join (inner)
-> Filter
-> Table "DYREKCJA" as "D" Access By ID
-> Index "PK_DYREKCJA" Full Scan
-> Bitmap Or
-> Bitmap
-> Index "PK_DYREKCJA" Unique Scan
-> Bitmap
-> Index "PK_DYREKCJA" Unique Scan
-> Filter
-> Table "INSPEKTORAT" as "I" Access By ID
-> Bitmap
-> Index "FK_INSPEKTORAT__DYREKCJA" Range Scan
(full match)
Ok, i see that between
Table "DYREKCJA" as "D" Access By ID
and
Index "PK_DYREKCJA" Full Scan
there is no "BITMAP", but can this be improved to see this more explicitly?
This reflects how data access works. All index scans are ordered by
design, unless a bitmap is applied afterwards.
Would something like this be better:
-> Index "PK_DYREKCJA" Full Scan (ordered by < field name(s) >)
?
If so, should it be printed only for index-based sorts but not for lookups?
Dmitry
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel