All,
I don’t know where to post this sort of info without the old “issues” tool. I’m just putting it here and hope the the right people will be advised.
There is a metaql record named contacts-detail is executing during some major slowdowns of pilot project. One thing I notice within that metasql statement is there is a CTE expression that uses a primary table of “cntct()”. Precisely Line 76 is “FROM chtct()”. I think this causes problems with the query optimizer. We know that the table cntct has indexes. However how does that info impact the query building when the primary FROM table is a function? The cntct() function only provides restrictions based on permissions. I’m assuming that it is returning the entire cntct dataset with no indexes. When I change line 76 to “FROM cntct” instead of “FROM cntct()” then the execution time of a sample queries drops from 5.21 MINUTES to 2.45 MINUTES. I hope this is helpful info.
Jim