Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Kjell Rilbe
Den 2013-08-13 10:23 skrev Dimitry Sibiryakov såhär: > 13.08.2013 10:07, Dmitry Yemanov wrote: > >> Select Expression >>-> Aggregate >> -> Sort (unique) >> -> Sort (unique) >> -> Table "RDB$RELATIONS" Access By ID >>-> Index "RDB$INDEX_0" Scan >> Is it

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Dimitry Sibiryakov
13.08.2013 10:07, Dmitry Yemanov wrote: > Select Expression > -> Aggregate > -> Sort (unique) > -> Sort (unique) > -> Table "RDB$RELATIONS" Access By ID > -> Index "RDB$INDEX_0" Scan > Is it understandable that sorts are independent from each other but both

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Dmitry Yemanov
13.08.2013 11:28, Kjell Rilbe wrote: > > I fear that I know too little about the inner workings, but I'm a bit > surprised... I would have thought that this is what actually happens: > > Select Expression > -> Aggregate >-> Sort (unique) > -> Table "RDB$RELATIONS" Access By ID

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Dmitry Yemanov
13.08.2013 11:55, Dimitry Sibiryakov wrote: > > Because plans are read from bottom to the top, I would prefer something like > this: > > (A) > > Select Expression > -> Aggregate >-> Sort (unique) >-> Table "RDB$RELATIONS" Access By ID > -> Index "RDB$INDEX_0" Scan No

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Dimitry Sibiryakov
13.08.2013 6:52, Dmitry Yemanov wrote: > Comments anyone? Other suggestions? Because plans are read from bottom to the top, I would prefer something like this: (A) Select Expression -> Aggregate -> Sort (unique) -> Table "RDB$RELATIONS" Access By ID -> Index "RDB$INDE

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Simonov Denis
Dmitry Yemanov писал(а) в своём письме Tue, 13 Aug 2013 08:52:02 +0400: > > Select Expression > 1: -> Aggregate > 2:-> Table "RDB$RELATIONS" Access By ID > 3: -> Index "RDB$INDEX_0" Scan > 4:-> Sort (unique) > 5: -> $(2) > > all methods are globally enumerated. The output is

Re: [Firebird-devel] Explained plan output: feedback wanted

2013-08-13 Thread Kjell Rilbe
Den 2013-08-13 06:52 skrev Dmitry Yemanov såhär: > All, > > There are some kinds of queries that have data access methods linked to > each other. Windowed functions are the obvious example, but it happens > even for regular aggregate functions. For example, COUNT(DISTINCT) needs > not only read the

[Firebird-devel] Explained plan output: feedback wanted

2013-08-12 Thread Dmitry Yemanov
All, There are some kinds of queries that have data access methods linked to each other. Windowed functions are the obvious example, but it happens even for regular aggregate functions. For example, COUNT(DISTINCT) needs not only read the underlying stream but also sort it in order to eliminat