Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate index #3711

Closed
BohuTANG opened this issue Dec 31, 2021 · 5 comments
Closed

Aggregate index #3711

BohuTANG opened this issue Dec 31, 2021 · 5 comments
Assignees
Labels
C-improvement Category: improvement community-take

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Dec 31, 2021

Summary

Table schema:

CREATE TABLE tbl (col1 INT, col2 INT, col3 INT);

Aggregate Indexes

CREATE AGGREGATE INDEX idx_name ON tbl (sum(col1), max(col2))
@BohuTANG BohuTANG changed the title Indexes Indexes design Dec 31, 2021
@BohuTANG BohuTANG mentioned this issue Dec 31, 2021
4 tasks
@BohuTANG BohuTANG added the C-improvement Category: improvement label Dec 31, 2021
@zhyass
Copy link
Member

zhyass commented Jan 4, 2022

/assignme

@BohuTANG
Copy link
Member Author

BohuTANG commented Jan 8, 2022

The index here is similar to the materialized view not like the index in OLTP.
For OLTP index, it maintains a primary key each row point to the base table, we won't need it.

@flaneur2020
Copy link
Member

i guess the same side with the OLTP indexes is it also requires transaction as its fundamental, on writing a row in the main table, the derived tables is also get updated in an ACID manner.

@BohuTANG BohuTANG changed the title Indexes design Aggregate index Mar 27, 2022
@jiaoew1991
Copy link
Contributor

after databend supported view,maybe use materialized view statement to implement this feature is more suitable

@BohuTANG
Copy link
Member Author

Now the databend view is a query alias, and the aggregate index is something like [min, max] index stored in the s3, but we don't have an RFC yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-improvement Category: improvement community-take
Projects
None yet
Development

No branches or pull requests

5 participants