Cestfait.ch

  • Home
  • Drupal
  • PHP 5
  • Jquery
  • Web Dev
  • Sys admin
  • Logiciels libres
  • Videos
  • Divers
  • Nous contacter
  • Mon c'est fait!
Home

mysql

Drupal 6, Patch Master/Slave

Submitted by Sir Squall on Fri, 10/08/2010 - 14:10

Il est là !!

Bon vous aviez peu de chance de le trouver car il n'existe pas, et les différents patch qu'il y a à l'heure actuelle, ne sont pas très performants, ni très efficaces !

Alors j'ai fait un patch, pour le master/slave sur Drupal 6, il est très fortement inspiré du fonctionnement de pressflow.

Je n'ai repris que cette partie et effectué différents test de performances qui sont aussi dans le fichier joint.

C'est fait !!!

0
Log in to vote
  • Login or register to post comments
  • Share this
Tags:
  • Drupal
  • drupal
  • mysql

Trouver les plus grandes tables de MySQL

Submitted by Sir Squall on Fri, 11/13/2009 - 13:32

une petite requête sql bien pratique, qui permet de sortir les table qui occupe le plus d'espace :

 

 

SELECT 
concat(table_schema,'.',table_name),
concat(round(table_rows/1000000,2),'M') rows,
concat(round(data_length/(1024*1024*1024),2),'G') DATA,
concat(round(index_length/(1024*1024*1024),2),'G') idx,
concat(round((data_length+index_length)/(1024*1024*1024),2),'G') total_size,
round(index_length/data_length,2) idxfrac 
FROM information_schema.TABLES ORDER BY data_length+index_length DESC LIMIT 10;

 

0
Log in to vote
  • 2 comments
  • Read more
  • Share this
Tags:
  • mysql
  • Sys admin

MySql order by rand() very slow!

Submitted by Sir Squall on Wed, 11/11/2009 - 19:17

Quand on fait joujou avec des SELECT * FROM table ORDER BY rand() LIMIT 10; et quand on a plus de 1'000'000 resultat dans table et bah c'est lent !!

La solution c'est de faire un JOIN sur lui même avec les résultat en random yeah :)!

 

SELECT * FROM `members_details` 
JOIN (SELECT FLOOR(MAX(`member_id`)*RAND(123)) AS
ID FROM `members_details`) AS x ON `members_details`.`member_id` >= x.ID

C'est fait !!!

0
Log in to vote
  • Login or register to post comments
  • Share this
Tags:
  • mysql
  • rand
  • Web Dev
Syndicate content

User login

  • Create new account
  • Request new password
  • Sign in with Twitter

Translate

Sondage

Wich OS ?

Submitted by Sir Squall on Wed, 05/11/2011 - 10:07
  • Login or register to post comments

Recent comments

  • Usefull post. I bookmark this
    2 weeks 2 days ago
  • Usefull post. I bookmark this
    2 weeks 2 days ago
  • Arf, je suis à l'armée!
    25 weeks 3 days ago
  • hahaha c'est juste! Il n'y a
    31 weeks 6 days ago
  • yeah comme sa fait plaisir de
    32 weeks 1 day ago
  • wouahou merciii :-) !
    35 weeks 6 days ago
  • J'y réponds aujourd'hui ici
    36 weeks 1 hour ago
  • Salut, court article mais
    36 weeks 1 day ago
  • Oktoberfest power!!!
    40 weeks 6 days ago
  • yep je vais faire un petit
    42 weeks 4 days ago

Tags

cropping Divers Drupal drupal Drupal 7 emacs epsacrop firefox git Google Images jquery Jquery karmic koala La phrase du jour Lausanne Logiciels libres mysql PHP 5 php 5.3 Sys admin ubuntu Web Dev Zend
more tags

Popular content

Today's:

  • Drupal 6, Patch Master/Slave
  • Lucid lynx, html validator firefox 3.6 C'est possible!
  • 8ème Forum eCulture - ERACOM - 4 septembre 2009
  • It is finally here!
  • Google chrome pour mac
  • Drupal 7 effet avec les jquery.ui.dialog sur Drupal 6 !
  • Nice card
  • Coyote Ugly @ Winterthur
  • Echange de mail
  • Cron Daily

All time:

  • Dries Keynote DrupalCon Paris 2009
  • Drupal 7 effet avec les jquery.ui.dialog sur Drupal 6 !
  • Drupal bridge zend yeah !!
  • Jquery JSON en _POST
  • Drupal and Zend, form validate :)
  • [Drupal] Lightbox avec une gmap! yeah
  • Jquery slider c'est de la bonne !!!
  • [Drupal] Domain Access & memcache sa donne quoi ?
  • viportuguese-shop.com
  • Node Import et Taxonomy CSV

Last viewed:

  • Dries Keynote DrupalCon Paris 2009
  • Old Skool
  • SPL in PHP
  • Sa bosse dur!
  • Java-4 Ever
  • Drupal Mollom sa rox!
  • forcer le téléchargement
  • Clip
  • Drupal after build
  • Squall Beer Challenge '09

Twitter

Latest Articles

Derniers liens publiés

  • Cloudflare et Dropbox nommés Technology pioneers
    http://techcrunch.com/2011/09/01/cloudflare-dropbox-palantir-and-kickstarter-named-technology-pioneers-by-the-world-economic-forum/
  • Apprend le javascript en t'amusant
    http://www.codecademy.com
  • EPSACrop sur Drupal 7
    http://www.aswissidea.org/
  • Drupal solr attachement intégration
    http://tika.apache.org/
  • CloudFlare + Mollon
    http://www.cloudflare.com/

Pub

Google gadget

Add to Google

Facebook page

jiwa

all good song

Partenaires

Cyber Warfare

Drupal Factory

I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.