Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Taking Forever!
Message
 
To
09/01/2006 13:21:32
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01084813
Message ID:
01084841
Views:
7
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform