Hi, I am trying optimize a query which brings data...
# troubleshooting
s
Hi, I am trying optimize a query which brings data from
30 different segments
of a table. I use
timestamp
for the segment partitioning and also setup
rangeindexcolumn
on the same column
'report_date'
. for example select name, total_sales from product_sales where
report_date > '2024-01-20'
and
report_date < '2024-01-27'.
I see that no index has been used for this because
numEntriesScannedInFilter
is not zero. Lets say, I have
100k rows
per segment for
30days
worth of data then takes about `504ms f`or the query. Anyone knows how to optimize or tune any of the stuff?
x
each segment has 1 day data or 30 days data ?
s
1 day data like 100k rows in a segment so 30x100k rows in total
x
so 1 segment only contains entire 1 day's data ?
then your query should match full segment or won't match anything in it, then the predicate should be fairly cheap, and the segment selector might already do it for time pruner
see how many segment matched
s
about 9 segments matched for this and i see the same for processed
I use release 1.3.0. I believe, result set is huge thats why takes time but correct me If I am wrong
x
for column
report_date
you are already good enough, the segment pruner is already pruned segments and only query those segments within the time range
s
any options or tweaks there for serialization and deserialization part of it between server and broker? the simple reason is, massive data is getting out of the server and trying to reduce time during the transfer .