Groups | Blog | Home
all groups > sql server data mining > november 2003 >

sql server data mining : same query with different option, but the run time is various


Yuling
11/25/2003 6:36:10 PM
Hi,

I run the following query

select distinct a.fk_productid
from v_testview a
inner join TestProduct b
on a.fk_productid = b.fk_productid
Where b.fk_rsuid = 5
and b.active = 1
and a.quantity > 0
and a.fk_rsuid = 5

If I use fk_rsuid=1, then it only take about 14 sceonds. If I use fk_rsuid=5, it will take over 2 minutes. Usually, fk_rsuid=1 inlude more data than fk_rsuid=5 (it's about 4 times more data in fk_rsuid=1). The execute plan is the same.

Adam Machanic
11/26/2003 11:04:11 AM
Please post up your schema and indexes and maybe we can figure something
out.


[quoted text, click to view]
fk_rsuid=5, it will take over 2 minutes. Usually, fk_rsuid=1 inlude more
data than fk_rsuid=5 (it's about 4 times more data in fk_rsuid=1). The
execute plan is the same.
[quoted text, click to view]

AddThis Social Bookmark Button