I no longer work in heavy user base companies, so I need to get some pointers elsewhere. MySQL is becoming a bottleneck courtesy of Destakes and the several "I'm still waiting a response from you" Apache processes that are dragging the server down. Sure, there's still room for improvement on the code side, but MySQL should be quicker handling some hundred thousand lines.
I have a suggestion, dump MySQL and use a real database, like PostgreSQL. por Carlos Rodrigues a 4 Outubro 2006 - 12:56
Real database
Ok, so MySQL is not a "real database". So what's the defenition of a "real database"... por Carlos Jorge Andrade a 4 Outubro 2006 - 15:14
Witchcraft!
Carlos, just how did you manage to keep your projects going with a fictional (as opposed to "real") database? THAT is what we want to know!! </irony> por Rob a 4 Outubro 2006 - 20:08
MySQL
MySQL is a great database with great engines. PostgreSQL is also great nevertheless.
I'd suggest load balancing within a master and a client.
Another useful technique would be caching as much content as possible.
There are several tricks for speeding up things. For instance, avoid double (or more) primary keys. Use a simple ID as a key and then a UNIQUE constraint for the foreign keys. Also, keeping the tables normalized is generally a Good Thing but can slow down things.
Well, I guess you'll find this on your new books :-) por Mário Lopes a 4 Outubro 2006 - 21:49
Diferences betwen Oracle and MySQL
Same server, same bd (script and 35GB of data), same benckmark test,same PHP version (5.1.4) better results with MySQL. Reason? The mysql_fetch_object function!
Regards,
P.S: Sorry the english por Sandrio Fontes a 6 Outubro 2006 - 11:26
...
Eheh... Actually, MySQL 5.x (with InnoDB) mostly qualifies as a real database (ACID, decent locking, stored procedures, ...), although I still don't like it (mostly because their attitude about features only becoming important after MySQL implements them doesn't really give me the warm fuzzies - and I need the warm fuzzies when we are talking about data storage - and also because, well, PostgreSQL is just a better database overall). por Carlos Rodrigues a 6 Outubro 2006 - 17:07
...
Pá a diferença é que o MySQL se começa a borrar todo quando começa a levar com carga a sério.
Dá um testezinho ao Postgres a fazer o mesmo e se bem configurado vais ter uma agradável surpresa, aquilo é uma locomotiva autentica.
A diferença que eu noto mais entre o MySQL e o Pg, é que enquanto tens BD's pequenas, queries simples, ou meia dúzia de pessoas penduradas, ele porta-se normalmente muito bem, mas mal uma das variáveis acima se começa a alterar ele começa a perder terreno para o Postgres.
Tens um exemplo proximo :-) e olha que a BD completa tem 29 GB
Outra coisa que faz muita diff a nível de performance, não sei se aquilo é PHP ou perl, e caso seja perl é a bosta do fetchrow_hashref.
Olha que com result sets a partir das dezenas de milhar a diferença entre o fetchrow_hahref e o fetch_rowarrayref pode ser de segundos.
$sth->bind_columns(\($id, $name, $...))
while($sth->fetch) {
...
}
Faz alguns milagres por Nuno Mota a 6 Outubro 2006 - 20:11
Happy?
Contente com os livrinhos? Merecem ser comprados?
por Sandrio Fontes a 18 Outubro 2006 - 09:15
Blogmaster
Tem 36 anos, é natural de Vila Nova de Famalicão mas mora no Porto desde que veio para a universidade... bem, morou. Agora já casado, está pela Maia. Anda pela internet há já uns 16 anos tendo trabalhado em vários projectos como foram o caso do Mail.pt ou no Sapo. Também conhecido como o responsável pelo ITJobs, o Destakes e o Usauto entre outras brincadeiras.
De resto já bloga há uns 11 anos apesar de ter perdido parte da "vida" numa mudança de hosting provider. Algumas restias ainda por aí andam... ah, e o email de contacto está no footer.
não chateiem com os erros de Português... "the bad spelling is part of the charm". ;-)
escusado será dizer que as opiniões aqui expressas são minhas e só minhas, e não de outros ou da empresa onde trabalho
qualquer outro bitaite... ramblings at karlus.net
não, não é powered by MovableType
ou Wordpress, é powered by código meu em PHP
O conteúdo deste site não poderá ser utilizado sem a sua autorização expressa.
As imagens nele contidas são propriedade dos respectivos autores.