Re: Looking for help on query optimization statistics
Just providing an immutable link for posterity. (You can get one by
pressing y on most GitHub pages.)
Le lun. 5 nov. 2018 à 03:02, Ted Xu <frankxus@xxxxxxxxx> a écrit :
> Hi Tian,
> To inject statistics, you need to implement your own RelMetadataProvider
> and register it into your runtime environment.
> I'm not able to find a valid example in Calcite, but there is a good
> example you can find in Drill
> On Mon, Nov 5, 2018 at 11:54 AM Tian Ye <yet@xxxxxxxxxx> wrote:
> > Hi,
> > I'm working on comparing the query plan generated by Calcite with that
> > from a DBMS I'm developing.
> > In particular, I can generate some TPC-H data and a SQL query, and I want
> > to let Calcite generate as good query plan as it can. So far, I haven't
> > passed any statistics to Calcite, so the query plan it generates is just
> > baseline.
> > Now I wonder how I could pass statistics to Calcite. What I don't
> > understand is that since Calcite does not load the data until query plan
> > actually executed, how could I pass statistics to it?
> > I fail to find any document talking about how to do that in detail. The
> > last paragraphs of http://calcite.apache.org/docs/adapter.html do
> > mention it but are not so clear.
> > Would you please help me?
> > Thanks a lot.
> > --------
> > Tian Ye
> > yet@xxxxxxxxxx