I currently use a lot of perl binary hash files stored in multiple file locations for loading data into this cgi website. I am debating whether mySQL would be faster or slower if I decide to store my data there.
Any insights? I understand that perl hashes are completely loaded into memory.
Gordon
Using a database means your lookups will be slower but your script will use less memory.
Using in-memory hashes means your lookups will be faster but your script will use more memory.
If you’re not having memory troubles and your hashes will never get larger, then continue to use them.
If you’re not having memory troubles and your hashes will get larger, then look into using a database.
If you’re having memory troubles, use a database.
If you want to use a database for the sake of using a database (i.e. to learn new skills) then use a database.