Mejoras en el Prune de Foros šŸ„‡ Foro Portal DragonFlyCMS, CPGNuke

Foros de discusiĆ³nPortal DragonFlyCMS, CPGNuke

#1:  Mejoras en el Prune de Foros  Autor: Aforo Enlaces Publicado: Jue Mar 26, 2009 8:10 pm
    ----
Cuando los foros son muy grandes (pongamos 1000 temas) el prune se puede hacer eterno...

Esto es sobre todo causado por la poca eficiencia del SQL del prunining de los foros.

Para solucionarlo he mejorado la SQL de la funcion prune:

includes/phpBB/prune.php sobre la linea 35:

Quote::

//
// Those without polls and announcements ... unless told otherwise!
//
// $sql = "SELECT t.topic_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
// WHERE t.forum_id = $forum_id
// $prune_all
// AND ( p.post_id = t.topic_last_post_id OR t.topic_last_post_id = 0 )";

$sql = "SELECT t.topic_id FROM " . POSTS_TABLE . " p LEFT JOIN " . TOPICS_TABLE . " t ON p.post_id = t.topic_last_post_id
WHERE t.forum_id = $forum_id $prune_all ";

Ahora va casi 100 veces mas rapido. Muy feliz





Foros de discusiĆ³nPortal DragonFlyCMS, CPGNuke

Todas las horas son GMT + 1 Hora

PƔgina 1 de 1 - Tema con 1 Mensajes y 9619 Lecturas

DiseƱo web, bases de datos, lenguajes de programaciĆ³n, comunidades... todo lo necesario para construir tu sitio web.
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad Construyendo la web 2.0
The logos and trademarks used on this site are the property of their respective owners. We are not responsible for comments posted by our users, as they are the property of the poster.
Aviso Legal - Privacidad