Why Nested Aggregations do not perform well

Hi,
I have been trying a couple of queries which includes nested aggregations and filteredAggregations with subAggregation. But I have heard the fact that try to reduce nesting in aggregation since they degrade the performance. I have searched but haven't got any reason for the same. Can someone explain what happens internally when nested aggregation is used?
I know aggregation uses doc_values. For nested aggregations are they joined with themselves to get results OR how lucene sees these queries. Any help would be appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.