Writing Efficient Queries in SAS Using Proc sql with Teradata

后端 未结 5 520
[愿得一人]
[愿得一人] 2021-02-06 11:58

EDIT: Here is a more complete set of code that shows exactly what\'s going on per the answer below.

libname output \'/data/files/jeff\'
%let DateStart = \'01Jan         


        
5条回答
  •  心在旅途
    2021-02-06 12:21

    If the id is unique you might add a UNIQUE PRIMARY INDEX(id) to that table, otherwise it defaults to a Non-unique PI. Knowing about uniquenes helps the optimizer to produce a better plan.

    Without more info like an Explain (just put EXPLAIN in front of the SELECT) it's hard to tell how this can be improved.

提交回复
热议问题