more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Maybe you need to think about the problem a bit differently. My last big a-ha! moment was when I realised I'd designed my database for data storage when what I should have been doing is designing it for data retrieval..
It sounds like you want to be able to do a query something like: select room from search_table where max_capacity >= ? and pack_guests >= ? and pack_guests <= ? and valued_guest=? and agent=? and referral=? The idea is to turn things around so instead of trying to apply a set of rules to a table of data you put the rules in a table and use it to look up the data. In my case I was trying to process orders taking into account available stock, order payment, dispatch option selected by customer etc, etc. So to do a search for orders ready to be processed there were lots of lookups and calculating here there and everywhere to collect all the data needed for each order. I re-organised the order data so each order record had everything I needed and allowed me to do a single (although not simple) query to get all the orders ready to be processed. Once I had the data laid out correctly the database could easily and quickly process the query. On the database config side of things.. have you modified your mysql config to allow it to use as much memory as you think it has available? Tuning Server Parameters cheers, J In reply to Re: OT: Scalable web application architecture
by edoc
|
|