Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

komparacija statistics io output-a

[es] :: MS SQL :: komparacija statistics io output-a

[ Pregleda: 1776 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

bjevta
Bratislav Jevtic
http://www.tojesoft.co.rs
Beograd

Član broj: 5216
Poruke: 367
80.93.235.*

Sajt: www.tojesoft.co.rs


+5 Profil

icon komparacija statistics io output-a30.12.2014. u 13:46 - pre 67 meseci
obratite paznju na STATISTICS IO message box output. u pitanju su 2 upita, vracaju identican rezultat

a) vreme izvrsenja varira ali 'ajd' da kazemo da je skoro isto. to nije problem.
b) prvi upit ima veliki SCAN COUNT nad PPS_ACL_FIELDS tabelom (koristi index) dok drugi ide po PK nad tom tabelom
c) exec plan kaze da je cena prvog upita 40% a drugog 60%

mene zbunjuje to sto bi po nekoj mojoj logici drugi upit trebalo da bude "jeftiniji" a ispada da je, navodno, skuplji.


(34530 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_ACL_FIELDS'. Scan count 172650, logical reads 623125, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_PRINCIPALS'. Scan count 3, logical reads 452, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_EXT_ENUM_UTYPE'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

SQL Server Execution Times:
CPU time = 1154 ms, elapsed time = 1369 ms.

(34537 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_ACL_FIELDS'. Scan count 0, logical reads 621666, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_PRINCIPALS'. Scan count 3, logical reads 452, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'PPS_EXT_ENUM_UTYPE'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

SQL Server Execution Times:
CPU time = 718 ms, elapsed time = 1053 ms.

Acta, non verba!
 
Odgovor na temu

[es] :: MS SQL :: komparacija statistics io output-a

[ Pregleda: 1776 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.