Subject | What is the fastest form of execution |
---|---|
Author | Stephen Wood |
Post date | 2003-11-26T07:02:46Z |
Hi all,
What is the fastest form of execution for a select, and I'm going to throw a
union in just to expand the idea a bit...
Select column1, column2, column3
From Table1
Where Column1 = X
And Column2 = Y
Union
Select column1, column2, column3
From Table2
Where Column1 = X
And Column2 = Y
Question Part 1
You can execute the select as straight SQL, or you can put the select in a
view, or you can write a stored procedure...so what method would be the
fastest to slowest...
Question Part 2
Is this default behaviour for all RDBMS's or does this change between
RDBMS's?
Stephen Wood
Technical Specialist
Discovery Life - Servicing
Discovery
<http://www.discovery.co.za/>
Direct: +27 11 529 5033
Fax: +27 11 539 5648
Mobile: +27 84 461 6762
E-mail: stephenw@...
<http://www.discovery.co.za/> URL: http://www.discovery.co.za
<http://www.discovery.co.za/>
"This message and any attachments are confidential and intended solely for
the addressee. If you have received this message in error, please notify
Discovery immediately, telephone number +27 11 529 2888. Any unauthorised
use; alteration or dissemination of the contents of this email is strictly
prohibited. In no event will Discovery or the sender be liable in any manner
whatsoever to any person for any loss or any direct, indirect, special or
consequential damages arising from use of this email or any linked website,
including, without limitation, from any lost profits, business interruption,
loss of programmes or other data that may be stored on any information
handling system or otherwise from any assurance that this email is virus
free even if Discovery is expressly advised of the possibility of such
damages."
[Non-text portions of this message have been removed]
What is the fastest form of execution for a select, and I'm going to throw a
union in just to expand the idea a bit...
Select column1, column2, column3
From Table1
Where Column1 = X
And Column2 = Y
Union
Select column1, column2, column3
From Table2
Where Column1 = X
And Column2 = Y
Question Part 1
You can execute the select as straight SQL, or you can put the select in a
view, or you can write a stored procedure...so what method would be the
fastest to slowest...
Question Part 2
Is this default behaviour for all RDBMS's or does this change between
RDBMS's?
Stephen Wood
Technical Specialist
Discovery Life - Servicing
Discovery
<http://www.discovery.co.za/>
Direct: +27 11 529 5033
Fax: +27 11 539 5648
Mobile: +27 84 461 6762
E-mail: stephenw@...
<http://www.discovery.co.za/> URL: http://www.discovery.co.za
<http://www.discovery.co.za/>
"This message and any attachments are confidential and intended solely for
the addressee. If you have received this message in error, please notify
Discovery immediately, telephone number +27 11 529 2888. Any unauthorised
use; alteration or dissemination of the contents of this email is strictly
prohibited. In no event will Discovery or the sender be liable in any manner
whatsoever to any person for any loss or any direct, indirect, special or
consequential damages arising from use of this email or any linked website,
including, without limitation, from any lost profits, business interruption,
loss of programmes or other data that may be stored on any information
handling system or otherwise from any assurance that this email is virus
free even if Discovery is expressly advised of the possibility of such
damages."
[Non-text portions of this message have been removed]