79490331

Date: 2025-03-06 18:25:42
Score: 3
Natty:
Report link

Thanks. But it is taking too much time when trying to fetch the same for single studentid (say 25) from a 500 Million table. Seems all the hierarchies are being built out of 500 Million rows, then it's fetching record for studentId (say 25). Where this studentid = 25 can be introduced as a filter inside the query so that query plan is optimum and it only fetches the hierachy corresponding to 25.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user3016635