Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query Taking Forever!
Message
 
À
09/01/2006 13:33:29
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01084813
Message ID:
01084862
Vues:
14
Actually, the database is on my local PC. It's a working copy of the network
database, so this would never work when pointed to the network.


>OK, then you might want to try removing the Status index. Also, make sure that no indexes are set for either table before you run the query. And, assuming the tables are on a network drive, I'd be suspicious of a poor network setup.
>
>Good luck,
>
>>Jim
>>
>>Both MOD.Media_Order and MO.Status have indexes.
>>
>>Kevin
>>
>>
>>>>I'm still working on this one. This query is a pared down version of
>>>>what I actually need. I killed this after 5 minutes.
>>>>
>>>>There is an index on media_order.Id
>>>>
>>>>
>>>>
>>>>use euro_temp
>>>>
>>>>select mo.Document AS DocId,
>>>>       mo.id AS MoId,
>>>>       mod.Id AS ModId,
>>>>       mo.show_title AS ShowId,
>>>>       mo.order_rate,
>>>>       mo.program_name,
>>>>       mo.order_qty,
>>>>       mod.actual_air_date,
>>>>       mod.actual_air_time
>>>>  FROM Media_Order mo
>>>>  JOIN Media_Order_Detail mod ON mod.Media_Order = mo.id
>>>>  WHERE mo.status = 'ACTIVE'
>>>>
>>>
>>>How about an index on Media_Order_Detail.Media_Order. This is probably more important than the index on Media_Order.ID.
>>>
>>>Also, depending on the mix of status records, an index on Media_Order.Status might either help or hurt.
>>>
>>>Regards,
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform