Better perf for phpunit on very large databases
This commit is contained in:
parent
53522fb8dd
commit
7217dc3114
@ -3342,6 +3342,8 @@ class Propal extends CommonObject
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -3720,6 +3720,8 @@ class Commande extends CommonOrder
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -1555,6 +1555,8 @@ class FactureRec extends CommonInvoice
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -4090,6 +4090,8 @@ class Facture extends CommonInvoice
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -2310,6 +2310,8 @@ class Contrat extends CommonObject
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= " AND tosell = 1";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -5142,7 +5142,7 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$table_element."_extrafields";
|
||||
$sql .= " WHERE fk_object = ".$rowid;
|
||||
$sql .= " WHERE fk_object = ".((int) $rowid);
|
||||
|
||||
//dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); // Too verbose
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -2425,6 +2425,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -881,6 +881,8 @@ class Livraison extends CommonObject
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= " AND tosell = 1";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -1158,6 +1158,8 @@ class Reception extends CommonObject
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -2285,6 +2285,8 @@ class SupplierProposal extends CommonObject
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql .= " WHERE entity IN (".getEntity('product').")";
|
||||
$sql .= $this->db->plimit(100);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user