Unix Technical Forum

Re: Unloading to two destinations

This is a discussion on Re: Unloading to two destinations within the Informix forums, part of the Database Server Software category; --> Andy Kent said: > Given that we don't live in such Utopian conditions, what approach > would give the ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:23 AM
Obnoxio The Chav
 
Posts: n/a
Default Re: Unloading to two destinations


Andy Kent said:
> Given that we don't live in such Utopian conditions, what approach
> would give the best compromise?


Call me old fashioned, but this really sounds like a job for Captain ACE
(or 4GL) )

--

Bye now,
Obnoxio

"C'est pas parce qu'on n'a rien à dire qu'il faut fermer sa gueule"
- Coluche

"I'm trying to see things your way, but I can't get my head up my ass"
- JCH

"Ogni uomo mi guarda come se fossi una testa di cazzo"
- Marco

You're so stupid, you think martial arts are paintings by a sheriff...

I went to the airport to check in and they asked what I did because I
looked like a terrorist. I said I was a comedian. They said, "Say
something funny then." I told them I had just graduated from flying
school.

-- Ahmed Ahmed
sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 08:23 AM
Andy Kent
 
Posts: n/a
Default Re: Unloading to two destinations

Ah. I forgot to mention, they don''t have 4GL or SQL.

I'd hoped there might be an UNLOAD ... EXECUTE PROCEDURE to dump the
purged rows, and do an in-place copy of the wanted rows within the
procedure, but such an option doesn't seem to exist.

Andy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 08:23 AM
scottishpoet
 
Posts: n/a
Default Re: Unloading to two destinations

create 2 tables keep_rows and purge_rows

write a stored procedure which will read the existing data and copy the
data into either keep_rows or purge_rows.

drop the existing table

rename keep rows

unload the purge ros and file them away







Andy Kent wrote:
> Ah. I forgot to mention, they don''t have 4GL or SQL.
>
> I'd hoped there might be an UNLOAD ... EXECUTE PROCEDURE to dump the
> purged rows, and do an in-place copy of the wanted rows within the
> procedure, but such an option doesn't seem to exist.
>
> Andy


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 08:23 AM
Andy Kent
 
Posts: n/a
Default Re: Unloading to two destinations

That would be the obvious one, but it incurs a lot of i/o. The whole of
the existing table would need to be written to the two other tables and
then one of those would need to be unloaded. (The purge amounts to
about 50% of the table).

I was hoping to find some way of unloading the data directly from the
old table.

Andy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 08:24 AM
Richard Kofler
 
Posts: n/a
Default Re: Unloading to two destinations

Andy Kent schrieb:
> That would be the obvious one, but it incurs a lot of i/o. The whole of
> the existing table would need to be written to the two other tables and
> then one of those would need to be unloaded. (The purge amounts to
> about 50% of the table).
>
> I was hoping to find some way of unloading the data directly from the
> old table.
>
> Andy
>


read the FM about table fragmentation
and detaching of fragments. This can/will
do your job & is pretty fast, once your table
is fragmented and when you have multicpus & some
memory to throw into the job and using PQDPRIORITY

dic_k
--
Richard Kofler
SOLID STATE EDV
Dienstleistungen GmbH
Vienna/Austria/Europe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 08:25 AM
Andy Kent
 
Posts: n/a
Default Re: Unloading to two destinations

How would range-based fragments do the trick without needing to add a
column to the table to determine whether or not the row is to be kept?
The deletion rules are complex (and involve more than one column) so
to-keep fragmentation couldn't be achieved with the existing schema.
Andy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com