I'm a coder. Welcome to my blog. Here are some of the records on my job.

Categories

How does the store procedure really work&quest;

SQL query will be compiled everytime it is executed.
Stored procedures are compiled only once when they are
executed for the first time.

This is general database question

But one big doubt is ,

For example ,

one dynamic work , that is i pass the userid to SP and sp will return the username,password,full details,

So for this scenario the query should execute once again know, so what is the necessary of SP instead of SQL QUERY ,

Please clear this doubt ,

Hi thanks for all your updates,

but i dont want the advantage, comparison ,

just say ,

How sp executing , while we go with dynamic works,

For example ,

if pass userid 10 then sp also read records 10 ,

if i pass 14 then, SP again look the 14 records , see this same work NORMAL SQL QUERY

doing , but on that time execute and fetching ,so why should i go for sp ,

Regards

Stored procedures, like the name says, are stored on the database server. They are transmitted to the server and compiled when you create them, and executed when you call them.

Simple SQL queries, on the other hand, are transmitted to the server and compiled each time you use them.

So transmitting of a huge query (instead of a simple "execute procedure" command) and compiling create an overhead which can be avoided by the use of a stored procedure.

MySQL, like other RDBMS, has a query cache. But this avoid only compiling, and only if the query is exactly the same than a previously executed query, which means the cache is not used if you execute 2 times the same query, with different values in a where clause, for example.

Related Articles

We able to use HAVING clause in SQL-query to filtrate groups of row. When we use GROUP BY clause it work directly in this way. But, let's look to this query: select 1 where 1!=1 having count(*)=0; (or append it with 'from dual' for Oracle). If HAVING

https://serverfault.com/questions/296603/understanding-ports-how-do-multiple-browser-tabs-communicate-at-the-same-time how can an application use port 80/HTTP without conflicting with browsers? How do multiple clients connect simultaneously to one po

Could anybody provide some details on "how entity framework actually works" or point me to a web site? I dont find any somehow.I'm affraid that it is so complex that you can start only here or buy this.

I'm going through the Getting Started with Rails guide and got confused with section 6.7. After generating a scaffold I find the following auto-generated block in my controller: def index @posts = Post.all respond_to do |format| format.html # index.h

I'm trying to generate random number between 0 and 40(inclusive). So the code I Implemented is this- y=rand()%41; However everytime I click compile and hit Run. It outputs the same random numbers. As in say for instance I ran this in a loop. for(i=0;

i really didnt know how to word the title so i did the best i could. we have an issue where we calculate final script (web based) execution time. we do a simple if(time()-$_SERVER['REQUEST_TIME']>X){ logMe(); } we find that sometimes the script is sh

One of the main examples that is used in demonstrating the power of MapReduce is the Terasort benchmark. I'm having trouble understanding the basics of the sorting algorithm used in the MapReduce environment. To me sorting simply involves determining

I understand how using vectorization in a language like MATLAB speeds up the code by removing the overhead of maintaining a loop variable, but how does the vectorization actually take place in the assembly / machine code? I mean there still has to be

This question already has an answer here: Correctness of Sakamoto's algorithm to find the day of week 2 answers Following function represents Sakamoto's Algorithm from Wikipedia page- http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week

can someone please explain me how does this line of code work. [].push.apply(perms, permutation(arr.slice(0), start + 1, last)); This function generates an array of all permutations of an input array; var permutation = function(arr, start, last){ var

When passing variable arguments to a statement, the type information does not get passed. Imagine this example using a string object (I'm using MFC/ATL's CString) CString name = "kevin"; printf("Hi %s", name); How does the printf state

How does Wicket's @SpringBean annotation work? Does it use reflection at run time? Does it make the compiler inject some code? Or what?Spring uses the class loader and ASM at runtime to find all annotated classes. You can configure where spring shoul