If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > Maximum hash size?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-06, 13:38
MCrowley MCrowley is online now
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
Maximum hash size?

I am looking into writing a perl script that could have a hash of several hundred entries. I am a bit nervous at the prospect of soaking up this much memory because a) I have never done it before, and b) I am not certain perl will perform well at that level. Has anyone played around with hashes of up to or over 500 entries? Or should I redesign now, before it is too late?
Reply With Quote
  #2 (permalink)  
Old 09-05-06, 21:17
KevinADC KevinADC is offline
Registered User
 
Join Date: Feb 2006
Posts: 56
A hash of several hundred key/value pairs should be nothing to worry about unless you are using a computer with very little memory. I've played around with hashes with thousands of key/value pairs and performance was not a problem as far as that goes.
Reply With Quote
  #3 (permalink)  
Old 09-06-06, 09:21
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,612
I've built a hash with 1,500,000 entries on a 6 Gb Windows 2000 machine that was also running SQL Server. It worked fine for me.

-PatP
Reply With Quote
  #4 (permalink)  
Old 09-06-06, 10:07
MCrowley MCrowley is online now
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
Thanks, guys. Although, I think I suffer from Hash envy, now ;-).
Reply With Quote
  #5 (permalink)  
Old 09-06-06, 12:50
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,612
I'm not suggesting that it is a good idea to build a hash that big, I'm just pleading guilty to having done it...

It was a Perl script to create a cross reference to an outrageous number of stored procediures doing all kinds of truly perverse things (cross database and sometimes even cross server access). The script took a long time to build, but it was tracking a truly horrific number of references to an unholy number of objects, so it was way better than trying to do it manually.

-PatP
Reply With Quote
  #6 (permalink)  
Old 09-06-06, 13:18
MCrowley MCrowley is online now
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
I am hoping this script only runs once per week. Looks like I am doing something similar to what you were. This is the second incarnation of my Online Data Dictionary. I am just trying to collect up all the tables, columns, and maybe indexes in this version. Stored procedures and views are still not being considered yet. Just not sure there is a demand for it, yet.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On