Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
>Does just having a database table indexed on the field you are using speed up a join with another table that is indexed on the joining field speed it up automatically or do you have to pick the index you want to use.
>
>i.e.
>
>select l.order_date, i.partnumber
>From
Sorry I hit the tab and I think it sent this.
If I Wanted to join the Fulfillment_Transaction table to the orders table
FROM
orders o
INNER JOIN
Fulfillment_Transaction ft
ON o.orders_ID = ft.trans_key01
could I use the
IX_Fulfillment_Transaction_key01
nonclustered
located on PRIMARY
trans_key01
OR
Could I speed up
SELECT
trans_key01
FROM
Transaction_Fulfillment
INTO
#TEMP
WHERE
ft.trans_module = 'ORDERS'
AND
ft.trans_submodule = 'SHIPPED'
AND
ft.trans_date between @startdate and @enddate
USING the IX_Fulfillment_Transaction_key01 index.
Thanks
Jim
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement