Using Join or Using View

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mgsn
    New Member
    • Jul 2007
    • 5

    Using Join or Using View

    i have query that select data from 4 tables (Using Join)

    can i make view that hold required data and select direct from it

    hint: average # of rows in table is 34,000,000 row

    so, Join or View which fast
  • Hermess
    New Member
    • Jun 2007
    • 3

    #2
    Originally posted by mgsn
    i have query that select data from 4 tables (Using Join)

    can i make view that hold required data and select direct from it

    hint: average # of rows in table is 34,000,000 row

    so, Join or View which fast
    I am not sure if i understand your question... but...

    Speed of both are same because in body od view you must specify Select statement using JOIN. View is only more securable and usable by side of praogramming because SELECT can be changed in wie but not in compiled assembly.
    I recommend tune your indexes on tables.

    Hope this is useful for you.

    Regards
    Hermess

    Comment

    • Infide
      New Member
      • Jul 2007
      • 28

      #3
      Originally posted by mgsn
      i have query that select data from 4 tables (Using Join)

      can i make view that hold required data and select direct from it

      hint: average # of rows in table is 34,000,000 row

      so, Join or View which fast
      Remember that a view doesn't hold any data. A view only contains the instructions to return a select statement. In fact, depending on what you are doing, a view could be much slower than a straight select statement.

      Make sure that all of the joins are on indexes. Apart from that, run the estimated execution plan and identify the bottle necks.

      Comment

      Working...