Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Query text vs SP

Query text vs SP

Scheduled Pinned Locked Moved Database
sharepointdatabasevisual-studiotutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Astricks
    wrote on last edited by
    #1

    When should I go for query & when should I prefer SP? For example, we can wrap a simple select query inside an SP . Is it a better way? Any technical advanatages by using a particular method? I'm asking just for optimizing my app.

    *

    C T 2 Replies Last reply
    0
    • A Astricks

      When should I go for query & when should I prefer SP? For example, we can wrap a simple select query inside an SP . Is it a better way? Any technical advanatages by using a particular method? I'm asking just for optimizing my app.

      *

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      General rule: Go for a query when you are doing something quick and dirty. Go for a stored procedure in all other circumstances.


      Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

      1 Reply Last reply
      0
      • A Astricks

        When should I go for query & when should I prefer SP? For example, we can wrap a simple select query inside an SP . Is it a better way? Any technical advanatages by using a particular method? I'm asking just for optimizing my app.

        *

        T Offline
        T Offline
        tommyligo
        wrote on last edited by
        #3

        SPs are the best for your db an sql: 1) less traffic on your network 2) best performance on your db 3) encapsulation and security are easier to manage.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups