FIX: Floating Point Underflow Exception Causes Bad Cardinality Estimate

This article was previously published under Q316004
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 102137 (SQLBUG_70)
An incorrect cardinality estimate may result from a floating-point exception encountered if the following conditions are true:
  • The query contains an inner join that uses an equality predicate.
  • The density in each of the two respective histograms used in the estimate is very small.
  • An internal calculation that uses the two densities results in a floating-point underflow. Note that SQL Server catches and handles this particular floating-point underflow exception without any exception appearing in the SQL Server error log. The only way to determine if this condition is met is to run SQL Server under a debugger and monitor for a floating point exception raised in the EqualInner function.
  • In the absence of the underflow, there is other information upon which you can make a better estimate, such as the index being unique.
When the floating-point underflow occurs, SQL Server reverts to making a guess for the cardinality estimate, which is inaccurate.
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack
NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 4.

The English version of this fix should have the following file attributes or later:
   Date          File name   ---------------------------   7.00.1019     Sqlservr.exe				
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 7.0 Service Pack 4.

Article ID: 316004 - Last Review: 10/24/2013 09:18:33 - Revision: 1.1

  • Microsoft SQL Server 7.0 Standard Edition
  • kbnosurvey kbarchive kbbug kbfix kbsqlserv700presp4fix kbqfe kbhotfixserver KB316004