|
Archives of the TeradataForumMessage Posted: Tue, 03 Sep 2013 @ 16:17:58 GMT
Hi John, As you are putting filter, less records will come to spool and performance will get improved. Even if output is same, query will run faster in second. You can check the same in explain plan as well. But as you are putting into a temp table (GTT, DT or VT), the temp table creation time and time to insert records also should be considered. In this case as you are small number of records, temp table creation may not give any improvement as total of all above time considered with time of execution of old query. But if you are applying this logic with some millions of records, you can see a considerable improvement in performance with second scenario. If you are considering only time to execute the main query, second will perform faster. Thanks, Sughesh.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||