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

Analytical query performance optimization #1286

Open
v0y4g3r opened this issue Mar 30, 2023 · 0 comments
Open

Analytical query performance optimization #1286

v0y4g3r opened this issue Mar 30, 2023 · 0 comments
Labels
C-enhancement Category Enhancements C-performance Category Performance

Comments

@v0y4g3r
Copy link
Contributor

v0y4g3r commented Mar 30, 2023

What type of enhancement is this?

Performance

What does the enhancement do?

-- first: over (partition by)
select t.* from(select a.*, row number () over (partition by <PARTITION_FIELD> order by <UPDATE_TIME> desc) rw
from a) t where t.rw = 1:

-- second: max by date
select t1.* from t1 inner join (
    SELECT max (create date) as create date, <MARK FIELD>
    FROM <SOME_TABLE> group by mark
) t2 on t1. create_date = t2.create_date and t1.mark=t2.mark

image

Implementation challenges

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements C-performance Category Performance
Projects
None yet
Development

No branches or pull requests

2 participants