If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Querying Questions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-05, 05:58
FAC51 FAC51 is offline
Registered User
 
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!
Reply With Quote
  #2 (permalink)  
Old 09-27-05, 08:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 09-27-05, 10:08
FAC51 FAC51 is offline
Registered User
 
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 10:10.
Reply With Quote
  #4 (permalink)  
Old 09-27-05, 13:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 09-27-05, 13:37
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On