[Vtigercrm-developers] ORDER BY modifiedtime slow...
Alan Lord
alanslists at gmail.com
Thu Jul 5 12:47:48 GMT 2018
On 05/07/18 13:39, nilay khatri wrote:
> Can I remove the "ORDER BY vtiger_crmentity.modifiedtime DESC" clause
> globally on vtiger 7.1?
>
> What other field would you then sort on ?
As with earlier versions of vtiger it didn't bother - MySQL would sort
how it sees fit.
Ordering by crmid would, I expect be much faster as it is an integer,
but a particular ordering is not critical IMHO for loading Listviews;
not when compared to waiting 5 seconds for a page of 20 records to load ;-)
PS: /modules/Vtiger/Models/ListView.php - line 248*
Al
> alanlord at dev:/var/www/html/vt71/modules⟫ grep -rn "ORDER BY vtiger_crmentity.modifiedtime DESC" *
> Documents/models/ListView.php:221: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> Import/models/ListView.php:91: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> PriceBooks/models/ListView.php:108: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> Products/models/ListView.php:82: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> RecycleBin/models/ListView.php:92: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> Vtiger/models/RelationListView.php:329: $query .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> Vtiger/models/ListView.php:248: $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
> Vtiger/models/MiniList.php:125: $query .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
More information about the vtigercrm-developers
mailing list