0

Which DB good in group and sum operation?
I have an entity like
Chair {
id,
count: x
appartment_id,
floor_id,
build_id
}
And I need a group by appartment_id OR floor_id OR build_id and sum count.

Comments
  • 0
    Or could somebody give the best practice to improve performance?
  • 0
    Indexing the group fields generally grants some performance benefits on the grouping operation. The aggregations on the other hand depends on the implementation of the database. I hope it helps.
  • 0
    All relational databases can do this for you incredibly easily. Add indexes to fields you select very often.
  • 0
    @p100sch Can help me pair index like (id, appartment_id), (appartment_id, floor_id) and etc?
  • 0
    @AlgoRythm The main reason my question is mostly I will select by group evenly
Add Comment