Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Different query plan sql2000/Express 2005
Message
De
21/05/2007 04:51:26
 
 
À
17/05/2007 14:00:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01226457
Message ID:
01227227
Vues:
32
>I have the following query:
>
>
>SELECT a.iAvail_id,b.cName
>FROM ACC_Available a
>	LEFT JOIN ACC_Division b 	
>		ON a.cFrom_id = b.cDivision_id 	
>WHERE a.cStatus_id = 'PREV' AND a.iAvail_id = a.iAvailGroup_id
>
>
>Indexes:
>ACC_Available
>- cStatus_id [CLUSTERED]
>- iAvailGroup_id
>- iAvail_id
>ACC_Division
>- cDivision_id [CLUSTERED]
>- cName
>
>When I run it under SQL2000 I get:
>- One Clustered Index Seek for ACC_Available
>- One Clustered Index Seek for ACC_Division
>When I run it under Express 2005 I get:
>- One Clustered Seek for ACC_Available
>- One Index Scan for ACC_Division
>
>ACC_Available has about 190 records on SQL2000 and about 11000 on EXPRESS,
>ACC_Divison has the same amount of records for both SQL2000 and EXPRESS (680).
>
>Why the difference?
>
>Thanks in advance.

I guess they have different statistics.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform