You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Enrico Olivelli <eo...@gmail.com> on 2017/11/09 08:52:16 UTC

Recycling Planner objects

I am going to use Calcite Planner inside my DBMS.
I would like to understand which objects can be reused and which objects
are treated in a dynamic fashion.

Planner object, is this cachable ? I see i is not stateless. Is it better
to alwayes create a new instance or could it be reclycled ?

Table statistics:
are them evaluated at every time a query is to be planned ?
at least the table size

Schemas:
in a live system schema changes, but as far as I have undestood the Schema
is part of Framework config.
Which is the best strategy ? to drop the current framework config and all
cached objects in case of a DDL command ?

Execution Plans:
Are RelNodes cachable ? I see they have strong references to the planner
which built the object.
I am looking to a cache like QUERY -> PhisycalPlan

Regards
Enrico

Re: Recycling Planner objects

Posted by Edmon Begoli <eb...@gmail.com>.
Enrico,

I created an issue for this:
https://issues.apache.org/jira/browse/CALCITE-2048

Please add your thoughts, findings, instructions, and comments into the
issue itself, and we'll translate these into the material for the site.

Thank you,
Edmon

On Fri, Nov 10, 2017 at 3:50 PM, Enrico Olivelli <eo...@gmail.com>
wrote:

> Il ven 10 nov 2017, 19:42 Edmon Begoli <eb...@gmail.com> ha scritto:
>
> > Good observation. I will create a JIRA issue for that, and maybe see if
> we
> > could put something together.
> >
>
> Thank you all.
> I will check into code, and share my thoughts/questions, hopefully this
> will be useful to build a first guide
>
> Enrico
>
>
> > On Fri, Nov 10, 2017 at 13:38 Luis Fernando Kauer
> > <lf...@yahoo.com.br.invalid> wrote:
> >
> > > Sorry,
> > > My knowledge hasn't reached that far.
> > > Currently the tutorial and example code is mostly for creating new
> > > adapters.
> > > I think we need tutorial, documentation and example code to work
> directly
> > > with the planner, because it is a lot harder.
> > > Regards,
> > > Luis Fernando
> > >    Em quinta-feira, 9 de novembro de 2017 06:52:26 BRST, Enrico
> Olivelli
> > <
> > > eolivelli@gmail.com> escreveu:
> > >
> > >  I am going to use Calcite Planner inside my DBMS.
> > > I would like to understand which objects can be reused and which
> objects
> > > are treated in a dynamic fashion.
> > >
> > > Planner object, is this cachable ? I see i is not stateless. Is it
> better
> > > to alwayes create a new instance or could it be reclycled ?
> > >
> > > Table statistics:
> > > are them evaluated at every time a query is to be planned ?
> > > at least the table size
> > >
> > > Schemas:
> > > in a live system schema changes, but as far as I have undestood the
> > Schema
> > > is part of Framework config.
> > > Which is the best strategy ? to drop the current framework config and
> all
> > > cached objects in case of a DDL command ?
> > >
> > > Execution Plans:
> > > Are RelNodes cachable ? I see they have strong references to the
> planner
> > > which built the object.
> > > I am looking to a cache like QUERY -> PhisycalPlan
> > >
> > > Regards
> > > Enrico
> > >
> >
> --
>
>
> -- Enrico Olivelli
>

Re: Recycling Planner objects

Posted by Enrico Olivelli <eo...@gmail.com>.
Il ven 10 nov 2017, 19:42 Edmon Begoli <eb...@gmail.com> ha scritto:

> Good observation. I will create a JIRA issue for that, and maybe see if we
> could put something together.
>

Thank you all.
I will check into code, and share my thoughts/questions, hopefully this
will be useful to build a first guide

Enrico


> On Fri, Nov 10, 2017 at 13:38 Luis Fernando Kauer
> <lf...@yahoo.com.br.invalid> wrote:
>
> > Sorry,
> > My knowledge hasn't reached that far.
> > Currently the tutorial and example code is mostly for creating new
> > adapters.
> > I think we need tutorial, documentation and example code to work directly
> > with the planner, because it is a lot harder.
> > Regards,
> > Luis Fernando
> >    Em quinta-feira, 9 de novembro de 2017 06:52:26 BRST, Enrico Olivelli
> <
> > eolivelli@gmail.com> escreveu:
> >
> >  I am going to use Calcite Planner inside my DBMS.
> > I would like to understand which objects can be reused and which objects
> > are treated in a dynamic fashion.
> >
> > Planner object, is this cachable ? I see i is not stateless. Is it better
> > to alwayes create a new instance or could it be reclycled ?
> >
> > Table statistics:
> > are them evaluated at every time a query is to be planned ?
> > at least the table size
> >
> > Schemas:
> > in a live system schema changes, but as far as I have undestood the
> Schema
> > is part of Framework config.
> > Which is the best strategy ? to drop the current framework config and all
> > cached objects in case of a DDL command ?
> >
> > Execution Plans:
> > Are RelNodes cachable ? I see they have strong references to the planner
> > which built the object.
> > I am looking to a cache like QUERY -> PhisycalPlan
> >
> > Regards
> > Enrico
> >
>
-- 


-- Enrico Olivelli

Re: Recycling Planner objects

Posted by Edmon Begoli <eb...@gmail.com>.
Good observation. I will create a JIRA issue for that, and maybe see if we
could put something together.

On Fri, Nov 10, 2017 at 13:38 Luis Fernando Kauer
<lf...@yahoo.com.br.invalid> wrote:

> Sorry,
> My knowledge hasn't reached that far.
> Currently the tutorial and example code is mostly for creating new
> adapters.
> I think we need tutorial, documentation and example code to work directly
> with the planner, because it is a lot harder.
> Regards,
> Luis Fernando
>    Em quinta-feira, 9 de novembro de 2017 06:52:26 BRST, Enrico Olivelli <
> eolivelli@gmail.com> escreveu:
>
>  I am going to use Calcite Planner inside my DBMS.
> I would like to understand which objects can be reused and which objects
> are treated in a dynamic fashion.
>
> Planner object, is this cachable ? I see i is not stateless. Is it better
> to alwayes create a new instance or could it be reclycled ?
>
> Table statistics:
> are them evaluated at every time a query is to be planned ?
> at least the table size
>
> Schemas:
> in a live system schema changes, but as far as I have undestood the Schema
> is part of Framework config.
> Which is the best strategy ? to drop the current framework config and all
> cached objects in case of a DDL command ?
>
> Execution Plans:
> Are RelNodes cachable ? I see they have strong references to the planner
> which built the object.
> I am looking to a cache like QUERY -> PhisycalPlan
>
> Regards
> Enrico
>

Re: Recycling Planner objects

Posted by Luis Fernando Kauer <lf...@yahoo.com.br.INVALID>.
Sorry,
My knowledge hasn't reached that far.
Currently the tutorial and example code is mostly for creating new adapters.
I think we need tutorial, documentation and example code to work directly with the planner, because it is a lot harder.
Regards,
Luis Fernando
   Em quinta-feira, 9 de novembro de 2017 06:52:26 BRST, Enrico Olivelli <eo...@gmail.com> escreveu:  
 
 I am going to use Calcite Planner inside my DBMS.
I would like to understand which objects can be reused and which objects
are treated in a dynamic fashion.

Planner object, is this cachable ? I see i is not stateless. Is it better
to alwayes create a new instance or could it be reclycled ?

Table statistics:
are them evaluated at every time a query is to be planned ?
at least the table size

Schemas:
in a live system schema changes, but as far as I have undestood the Schema
is part of Framework config.
Which is the best strategy ? to drop the current framework config and all
cached objects in case of a DDL command ?

Execution Plans:
Are RelNodes cachable ? I see they have strong references to the planner
which built the object.
I am looking to a cache like QUERY -> PhisycalPlan

Regards
Enrico