|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
separate select's vs union
let S1, S2, S3 be selects against different tables but with property that they can be used in union, can I safely assume that union works no worst than issuing those 3 selects separately?
i.e. Performance(S1 and S2 and S3)<=Performance(S1 union S2 union S3) is true? |
|
#2
|
||||
|
||||
|
IMHO not, because straight UNION suppresses duplicates with an addtional pass, what you said should apply to UNION ALL only.
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > separate select's vs union |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|