Changeset 94724 in spip-zone


Ignore:
Timestamp:
Jan 23, 2016, 3:05:45 PM (3 years ago)
Author:
cedric@…
Message:

Perf issue : forcer les sous-requetes en uncorrelated http://stackoverflow.com/questions/6135376/mysql-select-where-field-in-subquery-extremely-slow-why#6157797

Location:
_plugins_/albums/branches/v2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/albums/branches/v2/albums_fonctions.php

    r86340 r94724  
    2727
    2828        $select = sql_get_select("DISTINCT id_album","spip_albums_liens as oooo");
    29         $where = "'" .$boucle->id_table.".id_album $not IN ($select)'";
     29        $where = "'" .$boucle->id_table.".id_album $not IN (SELECT * FROM($select) AS subquery)'";
    3030        if ($cond){
    3131                $_quoi = '@$Pile[0]["orphelins"]';
     
    120120        }
    121121
    122         return $select;
     122        return "SELECT * FROM($select) AS subquery";
    123123}
    124124
  • _plugins_/albums/branches/v2/paquet.xml

    r86340 r94724  
    22        prefix="albums"
    33        categorie="multimedia"
    4         version="2.2.17"
     4        version="2.3.0"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.0.*]"
Note: See TracChangeset for help on using the changeset viewer.