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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Multiple requests to a view?

Multiple requests to a view?

Scheduled Pinned Locked Moved Database
question
3 Posts 2 Posters 1 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.
  • D Offline
    D Offline
    deostroll
    wrote on last edited by
    #1

    If a view is called multiple times by various applications, how does sqlserver respond? Does it execute the select statement (inside the view) only once or does it execute them per request?

    Q 1 Reply Last reply
    0
    • D deostroll

      If a view is called multiple times by various applications, how does sqlserver respond? Does it execute the select statement (inside the view) only once or does it execute them per request?

      Q Offline
      Q Offline
      QPun
      wrote on last edited by
      #2

      it execute them per request.. :) If you don't mind, on what purpose that make u consider such a question? Performance?

      D 1 Reply Last reply
      0
      • Q QPun

        it execute them per request.. :) If you don't mind, on what purpose that make u consider such a question? Performance?

        D Offline
        D Offline
        deostroll
        wrote on last edited by
        #3

        Me and my friend were discussing whether to go for a view or a stored procedure, because all we needed was an inventory report kind of stuff... I just learned that we further "abstract" from a view whose inside select statement is a kind of general query with no where condition or with some minimal conditions. A stored procedure on the other hand would work faster because we are exacting data we need with more where conditions. In both the cases we are only interested in the result set.

        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