seniorSQL

What is query cardinality estimation?

Updated May 17, 2026

Short answer

Cardinality estimation predicts number of rows returned by a query.

Deep explanation

The query optimizer uses statistics to estimate how many rows will be processed at each step. This helps choose join algorithms and indexes. Incorrect estimation leads to suboptimal execution plans.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More SQL interview questions

View all →