Desktop productivity for business analysts and programmers

Joining at once in QueryBuilder at once with Filtering

Accepted Solution Solved
Reply
Contributor
Posts: 37
Accepted Solution

Joining at once in QueryBuilder at once with Filtering

Hi Gurus,

 

i have three tables with one common key, once i pull those tables from the left pane,

 

i) is it better to join it through Query Builder and set filter (condition) at once (so that the DB server handle all queue ?)

 

or

 

ii) pull each table and filter fields (data -> filter, select necessary fields) first, then creates sas temp file and join them one by one

 

Which one is more effective ?

 

Thanks 


Accepted Solutions
Solution
‎02-20-2017 12:47 AM
Super User
Posts: 5,382

Re: Joining at once in QueryBuilder at once with Filtering

For most cases option 1 is preferred, at least from a performance point of view. But since every environment is unique I sugest yubtry both and compare.
Data never sleeps

View solution in original post


All Replies
Contributor
Posts: 37

Joining at once in QueryBuilder at once with Filtering

Hi Gurus,


i have three tables with one common key, once i pull those tables from the left pane,


i) is it better to join it through Query Builder and set filter (condition) at once (so that the DB server handle all queue ?)


or


ii) pull each table and filter fields (data -> filter, select necessary fields) first, then creates sas temp file and join them one by one


Which one is more effective ?


Thanks  

Joining at once in QueryBuilder at once with Filtering

Trusted Advisor
Posts: 1,459

Re: Joining at once in QueryBuilder at once with Filtering

As much as I know qury builder will generate SQL program.

In this case, it will anyway join first 2 tables and then join the 3rd to the intermediate one.

So my advise is to do whatever is easier for you.

Contributor
Posts: 37

Re: Joining at once in QueryBuilder at once with Filtering

Hi Shmuel,

 

Thank you for your help.

 

So that if i pull the 2 tables from SQLserver on left pane, then use Query builder join them , does it run the queue on the DB Server side ?

 

i know that if i let say filter the table first, then the new dataset will be save as Sas7dat format in Work folder, then any action later on will be on SAS server side.

 

Am i right ?

 

Thank you for your advice


After Filter.PNGTables.PNG
Trusted Advisor
Posts: 1,459

Re: Joining at once in QueryBuilder at once with Filtering

You are probably working on SAS EG. My experience with query builder is limited,

but if you can post the log I would be able to answer your question.

Super User
Posts: 7,405

Re: Joining at once in QueryBuilder at once with Filtering

I merged your identical questions into one thread. Please refrain from double-posting, it only makes following the answers difficult.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎02-20-2017 12:47 AM
Super User
Posts: 5,382

Re: Joining at once in QueryBuilder at once with Filtering

For most cases option 1 is preferred, at least from a performance point of view. But since every environment is unique I sugest yubtry both and compare.
Data never sleeps
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 242 views
  • 2 likes
  • 4 in conversation