apache / apache/pinot

Increase the latency of a query which has TIME as sorted column when ORDER BY TIME DESC is applied

Open
#6,970 4 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 3h
Merged PRs (30d)
195

Description

Hi,
There is usecase, where need to Increase the latency of a query which has ATIME as sorted column in a pinot table when ORDER BY ATIME DESC limit 100 is applied.

I've a select query which has ORDER BY ATIME ASC limit 100 is applied , then the the time taken for query is barely 15ms, (total rows - 450M, segments- 290, numOfDocsScanned - 318), where as for ORDER BY ATIME DESC limit 100 is taking around (timetaken -200ms, numDocsScanned - 5744955), which is very high, as it is reading whole segment.

Please provide a support reading the segment from bottom in this case, which can reduce the timetaken and numOfDocsScanned...

Thanks
Akram Syed

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported ASC and DESC queries against the described Pinot table and comparing scan counts and latency. The issue names no files, tests, or entry points, so trace the segment-reading path involved in sorted-column scans before defining the implementation scope. Done should include efficient DESC limited reads with regression coverage for the reported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.