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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trim a table for development...

Re: Trim a table for development...

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 28 Jan 2002 13:09:25 -0000
Message-ID: <1012223276.17368.0.nnrp-02.9e984b29@news.demon.co.uk>

Which version of Oracle, and how were you planning to get them into the database.

With a suitably recent version of Oracle you can specify a 'where clause' on the export which is applied to every row of every table exported. Best used with a parameter file.

e.g.

    tables = (orders, order_lines)
    query = 'where mod(order_id, 21) = 0'

NB Check the syntax, but this sort of thing would perhaps give you referential integrity between two tables, and give you about 1M rows out of 21M rows.

And in oracle 9, you can even import with:

    statistics = safe
and Oracle will apply the full data statistics to the small scale data set, so that execution plans have a better chance of being realistic on the development system.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Now running 3-day intensive seminars
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases


Stephen B wrote in message <4Rb58.6351$yi5.860512_at_news20.bellglobal.com>...

>Good morning all,
>
>We have a fact table of approximately 21 million records that we use in
>production. For development purposes I'd
>like our developers to use the table in our development database, but they
>don't need that many records...probably one million is sufficient...
>
>I'm trying to come up with a way to leave a representative sample of
records
>in the table but because of the nature of the
>data the sample won't be useful to them if I simply keep the first million
>records...are there any suggestions on how
>I could delete say, every twentieth record to trim the table down that way?
>
>Any thoughts gratefully accepted and best regards,
>
>Steve
>
>
Received on Mon Jan 28 2002 - 07:09:25 CST

Original text of this message

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