FIX: Floating Point Underflow Exception Causes Bad Cardinality Estimate

Article translations Article translations
Article ID: 316004 - View products that this article applies to.
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)
Expand all | Collapse all

SYMPTOMS

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.

CAUSE

When the floating-point underflow occurs, SQL Server reverts to making a guess for the cardinality estimate, which is inaccurate.

RESOLUTION

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 the Microsoft 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.

STATUS

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.

Properties

Article ID: 316004 - Last Review: October 24, 2013 - Revision: 1.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbsqlserv700presp4fix kbqfe kbhotfixserver KB316004

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com