Hashed files - delete recs vs reload

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Hashed files - delete recs vs reload

Post by ASU_ETL_DEV »

Hello,
If I delete records from a hashed file does that significantly influence the file's performance? Is it better to unload/reload the entire file, filtering out the records I do not need?
Thanks
ASU Developer
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

While pure inserts are more efficient than delete/update on an existing table, the performance difference on a well hashed file (dynamic files are well-hashed) isn't great.
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Post by ASU_ETL_DEV »

If I keep deleteing records daily, should I expect over time a degradation of performance that will eventually require a reload? I am trying to asses the maintenance impact of one method versus the other.
Thanks
ASU Developer
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hashed files don't suffer from fragmentation in that manner; but the default settings of 20% merge 80% split can cause overhead if you go past those limits. The hashed file uses a hashing algorithm on the key to decide into which group a record is placed, the number of groups is also seen as the MODulo of a file. Within these groups you have a linked list of values, so removing an element is not a big issue.
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Post by ASU_ETL_DEV »

All right, thank you.
ASU Developer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's more. Hashed files automatically re-use space freed by deleting records.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... deleting from hashed files... we're talking UV stage wearing, SQL deletes here I assume?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Post by ASU_ETL_DEV »

Yes, SQL delete in a UV stage versus a reload of the file.
ASU Developer
Post Reply