Welcome to Sign in | Help

Re: Consum Procesor 100% la un SELECT INTO ##tabelaTemporata

  •  02-10-2009, 12:15 PM

    Re: Consum Procesor 100% la un SELECT INTO ##tabelaTemporata

    crystyp:


    select top 1 *
    from statushistory
    where sth_number in
    (select pac_parcelNumber
    from package)
    AND sth_fk_sge is null
    AND sth_fk_sat = 27



    Ruleaza asta cu SET STATISTICS IO ON; si vezi daca accesul e scan sau seek (cite logical reads pe fiecare rowset).
    Altfel:
    1) TOP 1 fara ORDER BY este incorect
    2) sth_number IN (select) este inner join mascat, scoate-l afara explicit ca JOIN


    http://rusanu.com
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems