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
Content-Type: text/plain; charset="us-ascii"
The ORDER BY is a CPU hog and eliminating it should improve the run
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bin
Sent: Friday, August 27, 2010 1:37 PM
Subject: SQL performance
I am querying a table with 5 millions records and 5 fields using the
following SQL code:
create table test as
from temp.lab l
where =lab_id in ('8888-8','9999-1')
order by id, sample_dt;
It takes very long time to run (6 minutes). Is a way to make it run
Thanks in advance.
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.