Perl: the Markov chain saw | |
PerlMonks |
Re^2: OT - SQL choosing a schema for index tablesby bangor (Monk) |
on Aug 28, 2015 at 13:15 UTC ( [id://1140322]=note: print w/replies, xml ) | Need Help?? |
Thank you erix for your helpful reply. I am using MySQL.
- It seems unwise to name a table with 'index' or an '_index' suffix.
- ...Concentrate on getting easy-to-understand queries.
- Your option 2 (everything in one table) is called EAV and is generally frowned upon.
Maybe you should try to show us the SQL-'hairiness' that you fear. It probably isn't as bad as you think :) I don't have any hairiness at the moment, what I have is a Perl loop which queries each table in turn: And the sub to query the database is something like this... This all works correctly, but I can't help thinking that all these calls to the database server (which is on another machine) is very inefficient. I suppose my real itch is that there are only a couple of hundred rows in the main table, and I have another 10 or so tables to index the multiple-valued fields - from my reading this seems the correct way to do things, but at the same time feels over-engineered for such a small dataset.
In Section
Seekers of Perl Wisdom
|
|