Estimated Rows

  • Comments posted to this topic are about the item Estimated Rows

  • There may be a difference between on-prem and Azure, as I got 10 as the estimate on both with Azure SQL.

  • I also got 10 on the estimate after multiple attempts - my server is on-prem 2025 RC0.

    If this is undocumented behaviour, how can we know the answer without trying it?

    • This reply was modified 3 days, 15 hours ago by cgumprich.
  • There's an article on MS Learn describing the cardinality guess for MSTVFs as 100 after MSSQL 2014, and 1 before:

    Intelligent query processing details - SQL Server | Microsoft Learn

    That threw me off a little bit when 10/100 was not an option. 🙂

  • Yeah, need to specify a version here. I used SQL 2022 and that shows this reacts differently.

    100 was the value for a few years, but I think that is different for generate_series.

     

  • I'm using SQL Server 2022 and both had estimated rows as 10 on the final select. However in the Compute Scalar for the second query, it has 50 as the Estimated Number of Rows for both per row and for all executions.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply