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

[IOTDB-6310] Optimize for query resource init #12160

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

JackieTien97
Copy link
Contributor

@JackieTien97 JackieTien97 commented Mar 12, 2024

we use timefilter to filter useless timepartition instead of getting all of them and then filter tsfile in them one by one.

We insert 0~9999 points whose timestamp is also 0~9999 and execute flush after each point insert and then insert one point with timestamp now(). As so, we will get two partitions, one contains 10,000 tsfiles, another one contains only one tsfile.

execute the following sql: (only the last tsfile satisfies)

select s1 from root.db.d1 where time > now() - 1h;

before opt, the time for query init tsfile list are:(about 2.5ms)

3057000
2356292
3258834
2415417
2876041
2395750
2564833

after opt, the time for query init tsfile list are:(about 0.047 ms)

47500
39792
33875
31958
37584
56666
45709

Copy link

sonarcloud bot commented Mar 12, 2024

@JackieTien97 JackieTien97 changed the title Optimize for query resource init [IOTDB-6310] Optimize for query resource init Mar 13, 2024
Copy link
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~
Awesome improvement

Copy link
Member

@liuminghui233 liuminghui233 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :-)

@JackieTien97 JackieTien97 merged commit e0074ed into master Mar 13, 2024
36 of 37 checks passed
@JackieTien97 JackieTien97 deleted the ty/FilterPartition branch March 13, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants