<div dir="ltr">That's true.<div><br></div><div>Yeh you will have to comment out those lines of code.</div><div><br></div><div>We did some research with a DBA on improving this and various other parts but there was no productive outcome.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 5, 2018 at 6:18 PM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/07/18 13:39, nilay khatri wrote:<br>
> Can I remove the "ORDER BY vtiger_crmentity.modifiedtime DESC" clause<br>
> globally on vtiger 7.1?<br>
> <br>
> What other field would you then sort on ?<br>
<br>
As with earlier versions of vtiger it didn't bother - MySQL would sort <br>
how it sees fit.<br>
<br>
Ordering by crmid would, I expect be much faster as it is an integer, <br>
but a particular ordering is not critical IMHO for loading Listviews; <br>
not when compared to waiting 5 seconds for a page of 20 records to load ;-)<br>
<br>
PS: /modules/Vtiger/Models/ListView.php - line 248*<br>
<br>
Al<br>
<br>
> alanlord@dev:/var/www/html/vt71/modules⟫ grep -rn "ORDER BY vtiger_crmentity.modifiedtime DESC" *<br>
<br>
> Documents/models/ListView.php:221:                      $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> Import/models/ListView.php:91:                          $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> PriceBooks/models/ListView.php:108:                     $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> Products/models/ListView.php:82:                        $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> RecycleBin/models/ListView.php:92:                      $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> Vtiger/models/RelationListView.php:329:                 $query .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> Vtiger/models/ListView.php:248:                 $listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
> Vtiger/models/MiniList.php:125:                 $query .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>