Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting 100 or so rows back fast

Re: Getting 100 or so rows back fast

From: Nuno Souto <nsouto_at_nsw.bigpond.net.au.nospam>
Date: 2000/07/24
Message-ID: <397c1ce0.3419298@news-server>#1/1

On Sun, 23 Jul 2000 14:43:21 GMT, sergey_s_at_my-deja.com wrote:

>I have a table of about 3 billion rows partitioned in Oracle 8. Soon, I
>will need to run some tests and will need sample data for that from the
>big table (maybe 100 rows or so).

Yikes! 3 BILLION rows? You got a problem...

>
>Getting rows by ROWNUM is apparently so slow that I get tired of waiting
>for the resultset.
>
>How can I create a test table and populate it with 100 rows from the big
>table fast?
>

INSERT INTO TEST_T
SELECT *
FROM ORIG_T PARTITION <partition_name>
WHERE ROWNUM < 101;

better work or something is VERY wrong...

Cheers
Nuno Souto
nsouto_at_nsw.bigpond.net.au.nospam
http://www.users.bigpond.net.au/the_Den/index.html Received on Mon Jul 24 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US