[ 
https://issues.apache.org/jira/browse/IGNITE-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-6079:
------------------------------------
    Description: 
Ignite lacks cost-based optimizer what doesn't allow us to build efficient 
execution plans. Let's start moving in this direction.

The ticket is about creating local statistics for tables. In the first phase 
they will not be shared between nodes, neither they will participate in query 
optimization. The ultimate goal of this ticket is to start gathering some info 
in the background and provide necessary internal infrastructure and APIs for 
that.

*1. API*
Let's start with a single method {{GridQueryProcessor.rebuildStatistics()}}, 
which will build stats for all existing tables.
Then implement ANALYZE command [1]

*2. Infrastructure*
- Statistics are transient, not persisted
- We need a background worker which will re-build them on regular basis and 
replace old with new using copy-on-write approach
- Statistics are created for indexed (i.e. sorted) columns 
- Sampling should be used to avoid full table scan

*3. Statistics types*
- Height-based: the whole range is split into N pieces, so that exactly M/N 
entries are located between X and X+1 piece, where M is number of records

One statistics type should be enough in the first iteration.

[1] http://h2database.com/html/grammar.html#analyze

  was:
Ignite lacks cost-based optimizer what doesn't allow us to build efficient 
execution plans. Let's start moving in this direction.

The ticket is about creating local statistics for tables. In the first phase 
they will not be shared between nodes, neither they will participate in query 
optimization. The ultimate goal of this ticket is to start gathering some info 
in the background and provide necessary internal infrastructure and APIs for 
that.

*1. API*
Let's start with a single method {{GridQueryProcessor.rebuildStatistics()}}, 
which will build stats for all existing tables.

*2. Infrastructure*
- Statistics are transient, not persisted
- We need a background worker which will re-build them on regular basis and 
replace old with new using copy-on-write approach
- Statistics are created for indexed (i.e. sorted) columns 
- Sampling should be used to avoid full table scan

*3. Statistics types*
- Height-based: the whole range is split into N pieces, so that exactly M/N 
entries are located between X and X+1 piece, where M is number of records

One statistics type should be enough in the first iteration.


> SQL: implement base table statistics
> ------------------------------------
>
>                 Key: IGNITE-6079
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6079
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Priority: Major
>              Labels: performance, sql-engine
>
> Ignite lacks cost-based optimizer what doesn't allow us to build efficient 
> execution plans. Let's start moving in this direction.
> The ticket is about creating local statistics for tables. In the first phase 
> they will not be shared between nodes, neither they will participate in query 
> optimization. The ultimate goal of this ticket is to start gathering some 
> info in the background and provide necessary internal infrastructure and APIs 
> for that.
> *1. API*
> Let's start with a single method {{GridQueryProcessor.rebuildStatistics()}}, 
> which will build stats for all existing tables.
> Then implement ANALYZE command [1]
> *2. Infrastructure*
> - Statistics are transient, not persisted
> - We need a background worker which will re-build them on regular basis and 
> replace old with new using copy-on-write approach
> - Statistics are created for indexed (i.e. sorted) columns 
> - Sampling should be used to avoid full table scan
> *3. Statistics types*
> - Height-based: the whole range is split into N pieces, so that exactly M/N 
> entries are located between X and X+1 piece, where M is number of records
> One statistics type should be enough in the first iteration.
> [1] http://h2database.com/html/grammar.html#analyze



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to