.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 16th, 2012, 06:28 AM
diyaots diyaots is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2011
Posts: 121 diyaots Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 53 m 21 sec
Reputation Power: 0
Difference between a query and strored procedure

Dear all

can anybody solve the problem that what is the Difference between a query and strored procedure?

Thanks & Regards
Diya

Reply With Quote
  #2  
Old March 19th, 2012, 08:06 AM
sumanthk sumanthk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 2 sumanthk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 5 sec
Reputation Power: 0
Query & Stored Procedure

Hi,

Query and Stored procedure both are same but,
1.When you compile the code each and every time the compiler check the query where stored procedure first time checks and next time onward it will execute i.e(precompiled block of code stored procedure)
2.During Execution Each and every query Its time taking where as storedprocedure Not Time taking

3.In Query if you want to modify you want to edit the code , compile and Execute the code.where Stored procedure Just modify using Alter

Regards,
SUM

Reply With Quote
  #3  
Old March 29th, 2012, 01:07 AM
petersampsons petersampsons is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Location: Los Angeles, CA
Posts: 15 petersampsons Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 3 h 23 m 30 sec
Reputation Power: 0
Store procedure will not compile again and again while simple Query compile each time and then execute.

Reply With Quote
  #4  
Old August 14th, 2012, 05:38 AM
annaharris annaharris is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Location: USA
Posts: 33 annaharris Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 8 h 1 m 35 sec
Reputation Power: 0
Query and stored procedure do the same thing but the difference is that a query ought to be compiled every time the query is executed, while the stored procedure is in compiled form when executed first time. I f they use stored procedure they can avoid recompilation of the query.

Reply With Quote
  #5  
Old August 17th, 2012, 03:52 AM
SaraParker23 SaraParker23 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 10 SaraParker23 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 3 h 9 m
Reputation Power: 0
Query and SP

Every query is submited it will be compiled & then
executed.where as stored procedure is compiled
when it is submitted for the first time and this compiled
content is stored in something called procedure cache,
for subsequent calls no compilation,just execution & hence
better performance than query.
In Query we can execute only 1 statement. Stored Procedure:
In Stored Procedure we can execute Batch of Queries

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Difference between a query and strored procedure

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap