I've read frequently how stored procedures we create shouldn't be named with
sp_ since SQL Server will first check the master db before the current db
when trying to find the sp to execute. I always nodded and thought how I
was glad I hadn't done that. For some reason it never clicked that UDF
behavior could be the same.
I have several UDFs that start fn_... When I reference a UDF as dbo.fn_...
does SQL Server check the master db for these and only upon not finding them
check the current db? If so, is there a performance hit for this?
TIA,
John 2 4973
John P. Marshall (jm**************@isassoc.com) writes: I've read frequently how stored procedures we create shouldn't be named with sp_ since SQL Server will first check the master db before the current db when trying to find the sp to execute. I always nodded and thought how I was glad I hadn't done that. For some reason it never clicked that UDF behavior could be the same.
I have several UDFs that start fn_... When I reference a UDF as dbo.fn_... does SQL Server check the master db for these and only upon not finding them check the current db? If so, is there a performance hit for this?
No. To call a system-supplied UDF, you need to use ::, so that is
what SQL Server looks for. All system-supplied UDFs are table functions,
as scalar system functions are not UDFs at all.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp
Erland,
Cool... thanks for the good news.
Regards,
John
"Erland Sommarskog" <so****@algonet.se> wrote in message
news:Xn**********************@127.0.0.1... John P. Marshall (jm**************@isassoc.com) writes: I've read frequently how stored procedures we create shouldn't be named with sp_ since SQL Server will first check the master db before the current db when trying to find the sp to execute. I always nodded and thought how I was glad I hadn't done that. For some reason it never clicked that UDF behavior could be the same.
I have several UDFs that start fn_... When I reference a UDF as dbo.fn_... does SQL Server check the master db for these and only upon not finding them check the current db? If so, is there a performance hit for this?
No. To call a system-supplied UDF, you need to use ::, so that is what SQL Server looks for. All system-supplied UDFs are table functions, as scalar system functions are not UDFs at all.
-- Erland Sommarskog, SQL Server MVP, so****@algonet.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: serge calderara |
last post by:
Dear all,
I have an application which is suppose to start another executable process.
As soon as that process is running, I need to retrive its handle. The
problem of the particular process I am starting is that it has a welcome
window first which gets displayed and then the real windows after a while,in
other words it means that the...
|
by: ceadtinneh |
last post by:
Folks,
We're implementing a software based mirroring solution. This solution
requires that the SQL Server service on the target server be stopped
while data is being replicated from the source server.
One problem we encountered while testing was that the SQL Server
Service on the target server was inadvertantly started when users...
|
by: Andrew Bullock |
last post by:
Hi,
code:
myClass x = new myClass();
x.dosomethingwith(x,y);
How do i make dosomethingwith(x,y) run on a separate thread, and then
inform the main thread when it has finished?
|
by: Arnie |
last post by:
We're using the ServiceController class provided by the .NET Framework,
programming in C#. We are using the Start() method to start a service from
another service. This works fine most of the time, but occasionally after a
system startup (where the service doing the starting of the other is
automatically started by Windows XP) the...
|
by: Jim Langston |
last post by:
I know that functions starting with an underscore, or two underscores, are
reserved by the compiler/c++ and should not be used by the user and may
cause undefined behavior. My question is, how likely is it to actually
cause undefined behavior?
The reason I'm asking is I'm using a game engine where the sockets code is
not working correctly...
| |
by: derik |
last post by:
I hav a text file with N number of lines . i am able to read the file till the end .. in between many lines are starting with #. these lines starting with # are to be omitted. pleast help me in removing the lines starting with #
|
by: sathyan8294 |
last post by:
i want to display the name starting with any letter(A-Z,a-z) in textbox from sqldatabase through datagrid using vb.net windows application.
for example,
values are in datagrid like
companyid companyname contactperson city
1 IBM rajesh ...
|
by: Gustaf |
last post by:
Some error handling code:
catch (System.Xml.XmlException e)
{
Console.WriteLine("Error in " + e.SourceUri + ": " + e.Message);
return;
}
The output:
|
by: ropo |
last post by:
I have a .NET 2.0 app that at one point starts an old MFC App through
System.Diagnostics.Process.Start from a model form/
I then wait for it to finish by calling StartedProcess.WaitForExit();
Problem is:
When I close the MFC app if there is an window behind my .NET app it
will come to the front leaving my .NET app at the back.
|
by: PaulaCM |
last post by:
Hello Again Byters (hmmm... that sounded better in my head!)!
Question on Primary Keys / Auto numbering.
I want to make sure that each record has its own individual ID (hence primary key) but, I just want to choose the starting point. So, instead of starting with record ID 1, I'd like to start with record ID 1024. (I'm replacing a paper...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |