Re: Extract indexes
Posted in 2013
Topics: General Discussion
Hello,, What i want is to extract many. Tables schemas. In a. File. ()without indexes) and the indexes in antoher file. Then i can load the data quickly, set Psortnprocs, and pdqpriority to the max (100 ) and create to indexes. That s the best way i think. To load the data very quickly especially for them huge tables
I think I said this before and recently, but maybe not to you: Get my
package utils2_ak from the IIUG Software Repository and build it. One of
the utilities in there is my dbschema replacement utility myschema. If you
give myschema two filenames on the command line it will write the CREATE
TABLE statements (and some other required objects) to the first file and
the CREATE INDEX, privileges, constraints, etc. to the second file for
processing later. Example:
myschema -d mydatabase tables.sql indexes.sql
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, Apr 17, 2013 at 4:27 PM, SMITH JOHN <daylight@webmails.com> wrote:
> Hello,,
> What i want is to extract many. Tables schemas. In a. File. ()without
> indexes)
> and the indexes in antoher file. Then i can load the data quickly, set
> Psortnprocs, and pdqpriority to the max (100 ) and create to indexes.
>
> That s the best way i think. To load the data very quickly especially for
> them
> huge tables
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e01228d686cadea04da94762b
Something like cat schema.sql | sed 's/^create table/);/p' cat schema.sql | sed 's/^create .*index/);/p' Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of SMITH JOHN Sent: Wednesday, April 17, 2013 3:27 PM To: ids@iiug.org Subject: Re: Extract indexes [30093] Hello,, What i want is to extract many. Tables schemas. In a. File. ()without indexes) and the indexes in antoher file. Then i can load the data quickly, set Psortnprocs, and pdqpriority to the max (100 ) and create to indexes. That s the best way i think. To load the data very quickly especially for them huge tables **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
You can generate the schema, don't modify it, recreate tables with this schema, disable all indexes (one by one), load data, set pdq if you like, then enable indexes (one by one). I believe this produces the same as what you want to do. You can also use hpl to load since hpl disable indexes, load, then enable automagically. However, if you really want to separate table structures into one file and indexes into another, I guess you will have to do some scriptings. ________________________________ From: SMITH JOHN <daylight@webmails.com> To: ids@iiug.org Sent: Wednesday, April 17, 2013 3:27 PM Subject: Re: Extract indexes [30093] Hello,, What i want is to extract many. Tables schemas. In a. File. ()without indexes) and the indexes in antoher file. Then i can load the data quickly, set Psortnprocs, and pdqpriority to the max (100 ) and create to indexes. That s the best way i think. To load the data very quickly especially for them huge tables ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.