Hi folks, I am new to pinot so would like to apolo...
# general
v
Hi folks, I am new to pinot so would like to apologize in advance for the noob questions that be incoming: 1. Is there any major performance difference between using PQL and SQL? For example, we have a usecase where we need top X aggregations. I can do this through
top X using
PQL and
order by <aggregation> desc LIMIT X
using SQL. Which one do you reccomend? 2. What are the differences between metrics and dimensions? I could see aggregation queries are allowed on non-string dimensions as well
❤️ 1
r
hi Varun, 1. PQL is in the process of being deprecated, so don't start using it. There should be no performance problems with SQL. 2. Dimensions are things you might group by, but metrics are things you would aggregate. So in
select type,name,sum(value) from table group by type, name
type and name would be dimensions and value would be a metric. They are stored differently too, metrics don't have dictionaries, which makes them efficient to do things like sums over, and dimensions generally do have dictionaries, which generally compresses the data and makes group bys easier.
v
Thanks so much Richard! So
order by <aggregation> desc LIMIT X
is as efficient as using
TOP X
from PQL?
r
same query engine -> same performance
🆒 1