Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to read at the end of the file for external table

ronald_2017May 11 2020 — edited May 11 2020

Hi All,

Oracle 11gR2

In external tables, is it possible to read the file from end? Our alert log file more than 6 million rows.So, I want to the last 1000 rows only. Is this possible?

As far as I know, we can use SKIP parameter to jump the intended row number. However, when I select the table it executes about 30 secs. I am just wondering is there any way to read it from the end?

CREATE TABLE T_ALERT_LOG

(

    TEXT VARCHAR2(255)

) ORGANIZATION EXTERNAL

(

    TYPE ORACLE_LOADER

    DEFAULT DIRECTORY QUEST_SOO_UDUMP_DIR

    ACCESS PARAMETERS

(   records delimited by newline

    skip 6000000

    nobadfile

    nologfile

)

LOCATION ('alert_fecore.log')

)

REJECT LIMIT UNLIMITED;

My other question, is there any performnce issue because of selecting large external table?

Thanks in advance

This post has been answered by odie_63 on May 11 2020
Jump to Answer
Comments
Post Details
Added on May 11 2020
15 comments
7,478 views