From 419e42a44cb15984d0df9f5b620e2f389a54d0e0 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 1 Jan 2021 20:58:02 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 919ef58e..20c99ba8 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -6,11 +6,20 @@ MISC ITEMS THAT CAME UP todo: large number of units = timeout on list view -this query: +this query painfully slow and times out with huge data: SELECT COUNT(*) from aunit left outer join acustomer on (aunit.customerid=acustomer.id) left outer join aunit as aparentunit on (aunit.parentunitid=aunit.id) left outer join aunitmodel on (aunit.unitmodelid=aunitmodel.id) left outer join avendor on (aunit.purchasedfromvendorid=avendor.id) left outer join aunit as areplacedbyunit on (aunit.replacedbyunitid=aunit.id) -Figure it out + +This query: +SELECT COUNT(*) from aunit +left outer join acustomer on (aunit.customerid=acustomer.id) +left outer join aunit as aparentunit on (aunit.parentunitid=aunit.id and aunit.parentunitid<>null) +left outer join aunitmodel on (aunit.unitmodelid=aunitmodel.id) +left outer join avendor on (aunit.purchasedfromvendorid=avendor.id) +left outer join aunit as areplacedbyunit on (aunit.replacedbyunitid=aunit.id and aunit.replacedbyunitid<>null) +Super fast no timeout todo: Join filters make a huge difference in speed of datalist queries (and anything else when working with huge data) + check into all datalist and picklist queries with joins at the server and if the joined table is optional (foreign key null possibility) then add a join condition todo: Notification at server has NotifyDeliveryLog object unused and no UI at from for it either it's supposed to keep a set queue of the past 90 days of deliveries for troubleshooting like in v7,