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 2005 Forums
 Transact-SQL (2005)
 BST in SQL?

Author  Topic 

maifs
Yak Posting Veteran

57 Posts

Posted - 2010-04-22 : 10:50:29
hi...
can i use Binary Search Algorithm using SQL?

how can i use recursive procedure?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-22 : 11:05:07
recursive procedure can be implemented using CTEs in SQL

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-04-22 : 11:06:45
I suppose you could, but SQL has indexes that are Balanced Trees. Maybe you can explain what you want to do? Here is a link that might help you construct your question:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

maifs
Yak Posting Veteran

57 Posts

Posted - 2010-04-22 : 12:57:52
i have large amount of data in my db almost 999 tables and overall total size of db is 40GB.

i want to delete almost 30GB records on the base of date criteria.

some tables having relation with primary key and foreign key. so its

impact can't be neglected. procedure mechanism should be as such that

its performance should be maximum. it can be done within minimum time.

so thats why i want to use BST .
Go to Top of Page

maifs
Yak Posting Veteran

57 Posts

Posted - 2010-04-22 : 13:01:40
and i am using ms server2005
Go to Top of Page
   

- Advertisement -