Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 bookmart and nested loops, one concret question

Author  Topic 

marconi8
Yak Posting Veteran

73 Posts

Posted - 2003-05-09 : 07:34:03
here is my code.
 
SELECT a.ID,a.RAZDEL_NAME,a.SHORT_INFO,a.OBIAVLENIA_COUNT,
P_IMAGE = CAST(b.ID AS VARCHAR)+b.IMAGE_EXT
FROM dbo.DOSKA_RAZDEL a LEFT JOIN MAIN_IMAGE_LIST b
ON a.ID=b.OVNER_ID
AND
b.WEB_PAGE='DOSKA'
AND
b.S_PAGE='RAZDEL'


ok, lets examine my execution plan

1) on doska_razdel is clustered index scan, because i'am using left join

2) on main_image_list is index seek, because this table is internal

3) 1,2 collects data trought component nested loops

4) before component nested loop is component bookmark


this bokmark is used , because i have using statement


 
AND
b.WEB_PAGE='DOSKA'
AND b.S_PAGE='RAZDEL'



it is normal when bookmark is used before nested loops component, exactly this bookmark component connects to the main_image_list table


on table doska_razdel i have id clustered index

on table main_image_list i have id clustered index and

also second index (on table main_image_list) which is = ovner_id,web_page,s_page,s_part


thanks











Edited by - marconi8 on 05/09/2003 07:37:33

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-09 : 11:26:20
Marek,

Is there a question here?

Let me know.

Thanks


Brett

8-)
Go to Top of Page

marconi8
Yak Posting Veteran

73 Posts

Posted - 2003-05-09 : 17:13:17
sorry, my format of question was not soo good, here is my one line taken from my post





Q: it is normal when bookmark is used before nested loops component

this question connects to my post...

Go to Top of Page
   

- Advertisement -