Results 1 to 4 of 4

Thread: View

  1. #1
    Join Date
    Feb 2004
    Location
    Rhode Island
    Posts
    69

    Unanswered: View

    Hello Everyone,

    When I write a sql joining more than views how will be executed?.
    Does SQL Server execute each view and join the result set or interpret into one final sql and execute?

    Thanks
    Masanam

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The process that SQL 2000 uses is closer to joining all of the SQL source code for the views, then executing the final syntax, but it isn't quite exactly either of the options that you presented.

    -PatP

  3. #3
    Join Date
    Feb 2004
    Location
    Rhode Island
    Posts
    69
    Pat,
    Thanks for answering my questions.

    You mean to say that SQL server comes with up final SQL and executes it not matter how many joins inside each views

    Masanam

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Standard views are not precompiled, so the server is free to optimize as much as it is able.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •