Skip to content
Snippets Groups Projects
Commit d15a7081 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline rel #16903 improve perf in update facette process in cosmogramme

parent 61cb0d79
Branches
Tags
4 merge requests!563Master,!562Hotline 6.57,!561Dev#17990 miop integration suite,!559Hotline #16903 improve perf on facette request
- ticket hotline: 16903
- Intégration Cosmogramme
- Amélioration de la requête qui récupère les notices dans le processus de mise à jour des facettes (limit 10000 > limit 1000)
\ No newline at end of file
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/////////////////////////////////////////////////////////////////////////
......@@ -38,14 +38,14 @@ if ($phase == 7) {
// Lancer requete
if ($phase == 7.1) {
if(!$mode_cron and $phase_data["pointeur_notice"] > 0)
if(!$mode_cron and $phase_data["pointeur_notice"] > 0)
print("<h4>Mise à jour des facettes exemplaires</h4>");
while(true) {
$resultat = fetchAll("select id_notice,type_doc,facettes,date_maj from notices
where id_notice > ".$phase_data["pointeur_notice"]."
and date_maj >='" . $phase_data["pointeur"] . "'
Order by id_notice limit 0,10000");
Order by id_notice limit 0,1000");
if (!$resultat) break;
foreach ($resultat as $ligne) {
......@@ -60,12 +60,12 @@ if ($phase == 7.1) {
$phase_data["pointeur_notice"] = $id_notice;
$phase_data["nombre"]++;
if ($phase_data["nombre"] % 5000 == 0) {
print($phase_data["nombre"] . BR);
flush();
print($phase_data["nombre"] . BR);
flush();
}
continue;
}
$facette = explode(' ', $ligne["facettes"]);
$facettes = '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment