Skip to content
Snippets Groups Projects
Commit 08273ad9 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline_#16903_improve_perf_on_facette_request' into 'hotline_6.57'

Hotline #16903 improve perf on facette request

See merge request !559
parents 61cb0d79 d15a7081
Branches
Tags
3 merge requests!563Master,!562Hotline 6.57,!561Dev#17990 miop integration suite
- 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