W dniu 2016-08-02 07:54:35 użytkownik liviuslivius
<[email protected]> napisał:
> > And show also FK_SPRAWOZDANIE_POZ__ZF_POZ, please.
> >
> >
> > Dmitry
> >
> >
>
> Hi,
>
> sorry for long answer but database is not accessible remotely
>
> FK_SPRAWOZDANIE_POZ__ZF_POZ ASC DYR_ID, INSP_ID, POZ_ZLEC_FAKT_ROK,
> POZ_ZLEC_FAKT_NR, POZ_ZLEC_FAKT_POZ_NR 0.000030
>
> here is explained plan - it is more detailed - partial match on
> FK_SPRAWOZDANIE_POZ__ZF_POZ
>
> Select Expression
> -> Aggregate
> -> Nested Loop Join (inner)
> -> Filter
> -> Table "SPRAWOZDANIE_POZ" as "SP2" Access By ID
> -> Index "FK_SPRAWOZDANIE_POZ__ZF_POZ" Range Scan
> (partial match: 1/5)
> -> Bitmap
> -> Index "FK_SPRAWOZDANIE_POZ__SPR" Range Scan
> (full match)
> -> Filter
> -> Table "ZLEC_FAKT" as "ZF" Access By ID
> -> Bitmap
> -> Index "ZLEC_FAKT_PK" Unique Scan
>
> and index segments stats:
> FK_SPRAWOZDANIE_POZ__ZF_POZ DYR_ID 0
> 0.062500
> FK_SPRAWOZDANIE_POZ__ZF_POZ INSP_ID 1
> 0.015385
> FK_SPRAWOZDANIE_POZ__ZF_POZ POZ_ZLEC_FAKT_ROK 2
> 0.002825
> FK_SPRAWOZDANIE_POZ__ZF_POZ POZ_ZLEC_FAKT_NR 3
> 0.000032
> FK_SPRAWOZDANIE_POZ__ZF_POZ POZ_ZLEC_FAKT_POZ_NR 4
> 0.000030
>
> FK_SPRAWOZDANIE_POZ__SPR SPR_ID 0
> 0.000028
> FK_SPRAWOZDANIE_POZ__SPR DYR_ID 1
> 0.000024
>
>
>
> regards,
> Karol Bieniaszewski
>
>
>
above explained plan was for legacy plan (PLAN JOIN (SP2 ORDER
FK_SPRAWOZDANIE_POZ__ZF_POZ INDEX (FK_SPRAWOZDANIE_POZ__SPR), ZF INDEX
(ZLEC_FAKT_PK)))
I don't know if this is helpful but
here is the explained plan for legacy plan (PLAN JOIN (SP2 ORDER
FK_SPRAWOZDANIE_POZ__ZLEC_FAKT, ZF INDEX (ZLEC_FAKT_PK)))
Select Expression
-> Aggregate
-> Nested Loop Join (inner)
-> Filter
-> Table "SPRAWOZDANIE_POZ" as "SP2" Access By ID
-> Index "FK_SPRAWOZDANIE_POZ__ZLEC_FAKT" Range Scan
(partial match: 1/4)
-> Filter
-> Table "ZLEC_FAKT" as "ZF" Access By ID
-> Bitmap
-> Index "ZLEC_FAKT_PK" Unique Scan
regards,
Karol Bieniaszewski
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel