LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Aug 2010 14:16:04 -0500
Reply-To:     "Krawczyk, Kenneth E" <kenneth.krawczyk@INGENIX.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Krawczyk, Kenneth E" <kenneth.krawczyk@INGENIX.COM>
Subject:      Re: SQL performance
Comments: To: Bin Zhu <bxz01@HEALTH.STATE.NY.US>
In-Reply-To:  A<OF576B7DC9.40582DBC-ON8525778C.0065C582-8525778C.00664224@notes.health.state.ny.us>
Content-Type: text/plain; charset="us-ascii"

The ORDER BY is a CPU hog and eliminating it should improve the run time. Ken

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bin Zhu Sent: Friday, August 27, 2010 1:37 PM To: SAS-L@LISTSERV.UGA.EDU Subject: SQL performance

Hi,

I am querying a table with 5 millions records and 5 fields using the following SQL code: proc sql; create table test as select l.id,l.sample_dt from temp.lab l where =lab_id in ('8888-8','9999-1') order by id, sample_dt; quit;

It takes very long time to run (6 minutes). Is a way to make it run faster? Thanks in advance.

Frank IMPORTANT NOTICE: This e-mail and any attachments may contain confidential or sensitive information which is, or may be, legally privileged or otherwise protected by law from further disclosure. It is intended only for the addressee. If you received this in error or from someone who was not authorized to send it to you, please do not distribute, copy or use it or any attachments. Please notify the sender immediately by reply e-mail and delete this from your system. Thank you for your cooperation.

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.


Back to: Top of message | Previous page | Main SAS-L page