Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trim a table for development...
Thank you Jonathan..
And PLEASE accept my apologies for no version.....I know better (it's 8.1.7 by the way)
I was trying that sort of syntax in a delete because the table has already
been imported, but I may just drop it and import
again using your suggestion..
Thanks and kind regards,
Steve
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
news:1012223276.17368.0.nnrp-02.9e984b29_at_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:18:29 CST