| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Comments:
<0> HAH ****A <1> LETS SEE HOW YOU HELP HIM IF YOU CANT SPEAK <0> Abobo: there are many different ways to distribute 'load' depending on the workload of your application <1> hahah <0> ****a <0> find <0> fine <2> mostly the load I refer to is mysql's calculation load <0> I'm going to bed <3> will: would this work, DELETE FROM t2 USING t1 WHERE t2.id <> t1.id <2> large calculations and such <0> Abobo: write (insert, update, delete) or read (select) <1> Colloid, No. <2> mostly read <0> Abobo: replication is well suited to distribute read load
<2> problem is, with replication both servers can't write, right? <3> Will: what's wrong with it? <4> firewire: very much appreciated thanks ... http://pastebin.com/645646 <0> Abobo: yes but you'ret trying to distribute read load <2> the issue is, a server that calculates is also a server used by clients, which means it has to write <1> Colloid, Everything? <2> so I guess what I need is a way to distribute read and write load to many servers <0> babo: where are the teachers? <1> Colloid, Look in the wiki in topic. Go to regulars -> will. There is a sample SELECT query you'll need. You can use that as a template to create the DELETE <4> firewire: oops ... sorry just one sec <0> Abobo: so you want to setup your application to always write to one server and read from another server <1> firewire, The teachers are in the cl***room. DUH <0> or read from a load balancer infront of several servers <0> will: the teachers are in the teacher lounge smoking, we all know that <3> thanks <2> yea, but that pretty much involves rewriting every update/delete/insert command in the entire application to route all updates to a different server, right? <2> additionally, the user may not see an instant change, right? <0> Abobo: no, it involves rewriting the mysql_query calls to either go to a write connection or a read connection <4> firewire: I need the search to be able to correspond to school_jobs too .. http://pastebin.com/645647 <2> thats pretty much what I mean <0> mysql replication in normal conditions is usually up to date sub second <2> I see <2> and what if the master goes down? <0> that's a whole different story <3> will: DELETE FROM a LEFT JOIN b ON a.id = b.aid WHERE b.aid IS NULL <1> Colloid, WOW. You impress me. <2> I was told clusters is a better way to handle mysql replication, but cant find any info on that <3> :< <0> for now you want a very fault tolerant master <2> I see <3> will, will that work? <1> Colloid, I'm totally serious. That looks right. <3> <3 <1> Let me check to make sure. <0> Abobo: clusters are good for distributing write load, not read load <0> don't discredit mysql replication, it makes some very impressive things possible <2> I totally agree, just trying to think of any faults <2> basically I need a master to never fai <2> l <0> there are faults :) <2> and then I have to rewrite the application to send update/insert/delete to master <0> There are methods to failover a master <2> if master is a remote server, I'm ***uming there will be connection delays <5> I like that 'I need high availability at low costs' attitude <0> you can also go the cl***ic dual master route <2> hows that work? <4> firewire: I think I could probably do it if I was able to use CREATE VIEW ... but I'm on mysql 4.x ... so it's not available <3> ty will, u r a qt pi~ <1> Colloid, You need to add something after DELETE. Tell it what to delete. <1> You scare me now... <3> what do you mean? <1> Re-read the DELETE syntax. Or just try it :) <3> k <0> babo: so you're looking for rows where teacher id is the same in teachers, and recuiter_jobs but not sent_matches? <2> is it possible to write to a slave server? just not a good idea right? <3> it should work, it'll just delete a row <0> Abobo: I don't hink you need to <2> what I mean is, I may want to replicate only select tables <6> Abobo: possible, but you should not unless it is to a table or db which is nore replicated <2> and stupid little things like cache tables, keep on slave <0> Abobo: can you give us an overview of your situation?
<2> I do creditcard processing, we're getting big enough that a ton of transactions per minute is round the corner <2> in addition, merchants and admins use the same servers. calculating invoices and payroll causes high load. I want to do that on a different server <4> firewire: hmmm ... basically whenever I send a job to a teacher, I store the teacher_id and job_id in sent_match. I need a function that will pull out job matches that haven't already been sent and so don't exist in pairs in the sent_match table ... <0> ok how many credit card transactions per second are you doing? <2> so transaction server should probably be a slave, merchant/admin another slave, and then an independant master, right? <0> babo: inner join teachers, school_jobs left join sent_match where job_id is null <2> we're not there yet, average 10 thousand per day <0> your payroll calculations can easily run off a slave <0> same with invoices <2> yep, so basically it should be as I just mentioned right? <2> one for transactions, one for admin/merchant, and then an independant master? <0> no <2> by independant, I mean not public <0> you want a single master for active transactions then a slave for reporting <4> firewire: but the problem with that is if it only returns where job id is null, then if I send one job to a teacher, that teachers_id won't be null ... and so the teacher will be excluded from all other matches as well ... <2> mmm, ok <4> firewire: if you get what i mean ... <2> is there any limit to number of slaves that can be used? <0> Abobo: not anything you're going to hit any time soon <0> 10,000 transactions per day isn't much :) <2> gotcha, that should work <2> yea, its not <2> i'm planning for the future <0> that's good <0> you should go to the user conference this summer <2> I dont want to be there and not be ready <2> yea? where at <4> firewire: how do I inner join teachers and school jobs ... inner join them on what ? <0> santa clara, ca <7> Hi All :-) <2> i just might <0> babo: do you know the difference between an inner and outer join? <0> Abobo: yahoo is going to do a presentation on mysql fault tolerance <2> so the rest should be technical right? if the slave fails, I could fall over to the master and its really just code that ensures its seemless <2> nice <0> it's good stuff, trust me <4> firewire: yes, an inner join needs to join ON something though right ? <0> babo: no <4> babo -> w3schools ... <2> for a quick fix, would you recommend writing a custom php function for mysql_query that checks the query syntax and determines whether to read or write? or is that a potential problem? <0> if you inner join table a and table b mysql will only return rows where the condition matches a and b <0> with a left join mysql will return rows from a and null for b where the condition didn't mastch <2> unless you put a condition for b in the WHERE <0> Abobo: I would recommend explicitly specifying the mysql connection for read or write for each mysql_query call and setting your slave to read-only so it catches any attempted writes <2> you make a good case <2> I appreciate the help. thanks <0> no problem <7> anybody help me with php conection to mysql and sets variables for this connection... my example for this: <7> when i conect to mysql variables sets from section [client] in my.cnf? that's right? <0> no <0> php sets its variables from php.ini <7> ? <1> Well, usually you would specify connection settings in the PHP script itself... <1> would/should <0> php won't read the my.cnf files <7> but php use mysql libraries for connect to mysql and its lib use my.cnf ;-) <4> firewire: select * from inner join teachers, school_jobs left join sent_match where sent_match.job_id is null ... gives me a syntax error <4> oops ... <1> muhlik, No, the client reads my.cnf, not the libraries. <0> babo: free hand queries will do that <1> babo, No commas in that FROM! <4> firewire: sorry, I meant SELECT * <4> FROM teachers <4> INNER JOIN school_jobs <4> LEFT JOIN sent_match <4> WHERE sent_match.job_id IS NULL <6> missing join condition for the left join <0> I'm sure you can resolve the syntax issues <1> lokus, Also for the INNER :) <0> I'm not here to be perfect <4> firewire: ok cool, thanks ... <4> lokus: the inner join doesn't need an ON apparently <4> but the LEFT JOIN does ... ? <6> then the inner becomes a cartesian product
Return to
#mysql or Go to some related
logs:
obontu killingyourfather firmware ubuntu f506 modprobing in ubuntu a8e abbreviate gaim undernet timeout #linux #math gimp tutorial tree #perl
|
|