BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASNE
Obsidian | Level 7

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 

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20
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

6 REPLIES 6
SASNE
Obsidian | Level 7

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

Shmuel
Garnet | Level 18

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.

SASNE
Obsidian | Level 7

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
Shmuel
Garnet | Level 18

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.

LinusH
Tourmaline | Level 20
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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