|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^6: Creating SELECT-like look-up tables as hashesby loris (Hermit) |
| on Dec 05, 2013 at 09:13 UTC ( [id://1065730]=note: print w/replies, xml ) | Need Help?? |
|
Thanks for the offer of extra eyes - I am in fact somewhat databatially challenged. The goal is to take a list of real events and compare this with a list of potential events in order to do a statistical analysis of the probability of events occurring. The two tables are created like this:
The SELECTs I need are, for a given event in Real_Events:
I currently read the entire table of actual events into an array of hashrefs. This allows me to define a look-up table on, say, 'Group':
I can use this to get the rows for a given group and then loop over these to check the date. A similar approach can be used to create a look-up table with "$Name1$Name2$Group" as the key, which can be used to check whether a potential event has already occured I hope that gives a rough idea of what I'm trying to do. The program is orginally from a user whom I am trying to help get his data crunched before a deadline. So optimisation time plus run time has to comply with this restriction. Apart from that, unfortunately I also have other work to do, so the time I have to work on this also limited, but I would be greatful for any pointers to low-hanging fruit. Thanks,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||