Re: RE: External table performance

From: Sanjay Mishra <"Sanjay>
Date: Fri, 12 Jan 2018 22:56:45 +0000 (UTC)
Message-ID: <777412315.2233986.1515797805403_at_mail.yahoo.com>



 Marks 
Thanks for your update. Here are the derails  How many columns per record and what is the average length of a row?===> Only 7  columns with two Date column and 5 Varchar2(5) columnIs your select a single table query on the external table?===> It is single table Select Select     Columnsfrom T    able where  State_cd=:cidand DateCol between <date1> and <date2>and County_id in (<list of 3 Countie>)and status_cd in (<list of 4Status>); Are there predicates on the external table, or are you filtering on something in the external table?

===> Provided above is sample Query and only one query been used for external table 

Perhaps you could supply your select statement to give us a clue what you are trying to do.

==> Yes as shown above 

When you write that the storage is local, do you mean that the external table file is on your PC or do you mean that the external table file is local to the database server?

 ==> File is local to Database Server

IF the file is on your PC, you might well be testing your network bandwidth and latency to the database server as opposed to anything else. The time to transfer the file to the database server using an OS level tool would give you a decent approximation of the  minimum time to complete.

 ==> File is not on PC

IF the file is on your PC, the “records” are long, and you only need a few short columns from the “local” file, you might consider retrieving it via a pipe from sed so only the required data is transmitted across the WAN.  Thanks  for your input and suggestions. Sanjay

    On Friday, January 12, 2018, 4:19:44 PM EST, Mark W. Farnham <mwf_at_rsiz.com> wrote:  

 #yiv3008568169 #yiv3008568169 -- _filtered #yiv3008568169 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv3008568169 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv3008568169 {panose-1:0 0 0 0 0 0 0 0 0 0;}#yiv3008568169 #yiv3008568169 p.yiv3008568169MsoNormal, #yiv3008568169 li.yiv3008568169MsoNormal, #yiv3008568169 div.yiv3008568169MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv3008568169 a:link, #yiv3008568169 span.yiv3008568169MsoHyperlink {color:blue;text-decoration:underline;}#yiv3008568169 a:visited, #yiv3008568169 span.yiv3008568169MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv3008568169 p {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv3008568169 p.yiv3008568169MsoAcetate, #yiv3008568169 li.yiv3008568169MsoAcetate, #yiv3008568169 div.yiv3008568169MsoAcetate {margin:0in;margin-bottom:.0001pt;font-size:8.0pt;}#yiv3008568169 span.yiv3008568169BalloonTextChar {}#yiv3008568169 span.yiv3008568169EmailStyle20 {color:#1F497D;}#yiv3008568169 .yiv3008568169MsoChpDefault {font-size:10.0pt;} _filtered #yiv3008568169 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv3008568169 div.yiv3008568169WordSection1 {}#yiv3008568169 You wrote 50K records.

How many columns per record and what is the average length of a row?

Is your select a single table query on the external table?

Are there predicates on the external table, or are you filtering on something in the external table?

  

Perhaps you could supply your select statement to give us a clue what you are trying to do.

  

When you write that the storage is local, do you mean that the external table file is on your PC or do you mean that the external table file is local to the database server?

  

IF the file is on your PC, you might well be testing your network bandwidth and latency to the database server as opposed to anything else. The time to transfer the file to the database server using an OS level tool would give you a decent approximation of the  minimum time to complete.

  

IF the file is on your PC, the “records” are long, and you only need a few short columns from the “local” file, you might consider retrieving it via a pipe from sed so only the required data is transmitted across the WAN.

  

So far we can really only speculate what you are actually trying to accomplish.

  

mwf

  

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sanjay Mishra (Redacted sender "smishra_97" for DMARC) Sent: Friday, January 12, 2018 3:32 PM
To: Oracle-L Freelists; raza siddiqui
Subject: Re: External table performance

  

Raza

  

You are right that data is not an issue and so is External table but Select with few where clause and it cannot be index.

  

Sanjay

  

On Friday, January 12, 2018, 2:42:22 PM EST, raza siddiqui <raza.siddiqui_at_oracle.com> wrote:

  

  

Sanjay

Firstly, a 50k datafile is not big by any standards...

Secondly, when External Tables get to be fairly sizeable, one option could be to load the data into a temp table in the Database, use it then truncate once done.

Lastly, could the main select be the issue and not the External table or its data ?

On 1/12/2018 11:28 AM, Powell, Mark wrote:

Sanjay, you did not identify your Oracle version and edition nor post the actual code you have an issue with but consider the following.

I do not have access to a server where I can test right now but I believe that you can select from an external table using parallel query if you are on EE.

  

Mark Powell

Database Administration

(313) 592-5148

  

  

From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Sanjay Mishra <dmarc-noreply_at_freelists.org> Sent: Friday, January 12, 2018 2:23:40 PM To: Oracle-L Freelists
Subject: External table performance

 

Can someone share the Tuning activites that can be done for Selecting data from External table in 12c (12.1)? I am working on project that is getting every 6hourly data as flat file from external source and then has to be selected from ORacle table for some processing. Data is only 50K records but Select is taking time. It is Local Storage where File is located. I don;t think we can have indexes yet and so checking experience from the experts.

  

Tx

Sanjay

  

-- 
  
  
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 12 2018 - 23:56:45 CET

Original text of this message