Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    127

    Querying Questions

    Hi all, i have a 3[novice-like] questions:

    1
    When joining two tables, if joining a table to itself via aliasing, as opposed to joining two separate tables, is this less power/speed/resource intensive or more so?

    2
    SELECT...
    FROM...
    WHERE...
    AND a.col1 = 'jones' <--- is this line an actual join, or a comparison
    operation/condition?

    3, are outer joins so much of a burdon (regardless of actual querying)? i.e. are they more performance intensive than triggers per se? Do certain join types such as outerjoins, are more performance deteriorating if VL volumes of data stored in the db as opposed to smaller volumes of data, when querying?

    Thanks for reading, looking forward to replies!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1. yes!

    2. that's not a join condition

    3. you cannot compare outer joins to triggers -- performance of outer joins depends on indexes, not on the number of rows
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2004
    Posts
    127
    Hi r937,

    Thanks for your help

    btw with Q2, as it is not an actual join whats the correct tech term to describe what it is? Is it a comparison operation?
    Last edited by FAC51; 09-27-05 at 11:10.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    it's a filter condition

    at least, that's what i call it

    some people call it a single table predicate as opposed to a join predicate

    (predicate is a fifty cent word which means condition)

    both filter and join conditions involve a comparison operation
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    p.s. not sure if you understood my answer to your first question

    is it less power/speed/resource intensive or more so?

    the answer is yes, probably one or the other, unless it's equal

    what this means is that the performance depends on indexing and not on whether it's a self join or a join of two tables
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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