[EP-tech] Counting eprints in subject tree

Paolo Tealdi paolo.tealdi at polito.it
Wed Nov 28 16:57:24 GMT 2012

Dear all,

after migrated to 3.3.10 we noticed that counting eprints column in the 
subject tree was alwais 0 (this wasn't too bad as counting is 
dramaticaly slow  :-) ).
After a lot of debugging, we noticed that this happens if you create a 
subject with the parameter "multiple=>0".

Changing the field parameter to "multiple=>1" and making an "epadmin 
update 'db'" avoid the error (and the subject tree page  returns to be 
vewwy vewwy slow :-) )

If you trace the database query you can see that multiple=>0 parameter 
generates a broken sql query, something like :

-- piece of sql generated for phd subject
SELECT `eprint`.`eprintid` AS `eprintid`
       `eprint` AS `eprint_834169004`
         `subject_ancestors` AS `834169004subject_ancestors`
       ON `eprint_834169004`.`phd` = 
     AND (`834169004subject_ancestors`.`ancestors` = 'ROOT' OR
          `834797748subject_ancestors`.`ancestors` = 'ROOT')  -- This is 

Best regards,
Paolo Tealdi

Ing. Paolo Tealdi         Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi,  24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this 

More information about the Eprints-tech mailing list