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
 Transact-SQL (2000)
 Using Inline Tabled-Valued Function inst. of View

Author  Topic 

raclede
Posting Yak Master

180 Posts

Posted - 2005-05-23 : 03:59:13
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro2k/html/sql00j9.asp

Is this truly effective rather than using view???


"Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it. "

"The questions you ask consistently will create either enervation or enjoyment, indignation or inspiration, misery or magic. Ask the questions that will uplift your spirit and push you along the path of human excellence. "

K.I.S.S - Keep it simple stupid

raclede™

SreenivasBora
Posting Yak Master

164 Posts

Posted - 2005-05-23 : 17:41:23
Yes.

It is true Instead of using Views go for User defined inline finctions. Because view is a stored query, not a database object. Where as UDFs will store in database objects like stored procedures.It is compiled ones. No need to parse and compile for every time while executing it.

The SELECT statement used in an inline function is subject to the same restrictions as SELECT statements used in views


Pl. look at the Books online of SQL Server 2000 for Keyword "inline functions" :-)





With Regards
Sreenivas Reddy B
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2005-05-23 : 18:43:15
What a lot of utter bullshit.

The link basically says that inline functions are better because you don't have to write a WHERE clause. What a convincing argument...NOT! He conveniently leaves out the fact that the view allows us to define any WHERE clause we like. According to him/her we have to make a new inline function every time our search expression change.

Then the old "compiled once" argument. What a horrifying thought! A DBMS engine, trying to find the most efficient plan.. How dare it! The plan caching mechanism works extremely well and WILL reuse a views plan that has the same search criteria...just like the inline function.

Inline functions are useful when restricting sets prior to join operations. That (IMO) is all they are good for.

Where are my manners?.. Good morning!

DavidM

A front-end is something that tries to violate a back-end.
Go to Top of Page

raclede
Posting Yak Master

180 Posts

Posted - 2005-05-23 : 20:54:26
ok... this turns out confusing now.. I hope that one of SQl Team's SQL Goddess or MVP should give their thoughts about this matter.

"Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it. "

"The questions you ask consistently will create either enervation or enjoyment, indignation or inspiration, misery or magic. Ask the questions that will uplift your spirit and push you along the path of human excellence. "

K.I.S.S - Keep it simple stupid

raclede™
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2005-05-23 : 21:55:07
quote:

I hope that one of SQl Team's SQL Goddess or MVP should give their thoughts about this matter.





I don't know whether to laugh or cry at this.
That's pretty rude and presumptuous of you to assume that David's viewpoint isn't as valid as Rob's or Tara's because he has a 4 figure post count and isn't an MVP.

My money is with David here, Sreenivas needs to understand set based queries better, and raclede you need to realise that MSDN articles often like to push new features even when it's perhaps not the best way of doing things, this is a perfect example




Damian
Ita erat quando hic adveni.
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2005-05-23 : 22:06:39
Thanks Damian.

>> "Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it. "
Wisdom is not gained without independent thought...

I'm not upset that he asked for more help, but the fact that he is waiting for someone to make up HIS mind.


DavidM

A front-end is something that tries to violate a back-end.
Go to Top of Page

raclede
Posting Yak Master

180 Posts

Posted - 2005-05-23 : 23:06:10
Im not that rude... Im just confused betweens Davids and Sreenivas Reddy B presumption that's all..


"Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it. "

"The questions you ask consistently will create either enervation or enjoyment, indignation or inspiration, misery or magic. Ask the questions that will uplift your spirit and push you along the path of human excellence. "

K.I.S.S - Keep it simple stupid

raclede™
Go to Top of Page

Bad_Boy
Troll

6 Posts

Posted - 2005-05-24 : 06:38:49
what a stupid question!
Go to Top of Page
   

- Advertisement -