When you use the 'Addreses' lookup form and use the 'Additional Sorts' dropdown to select 'by Address1' it takes 30 minutes to display data when the customer has a large (1380) Address Codes.
There are 21000 customers with 27000 addresses total.
The GP Program is unrespnsive durring this time.
Using SQL Profiler I see it makes thouands of 'SELECT TOP 25' staements for ALL customers, not just the one being woked on.
Dynamics is issuing statments lik this thousands of times. Seel like thet forgot to set the range on the cusomer number field.
SELECT TOP 25 CUSTNMBR,ADRSCODE,SLPRSNID,UPSZONE,SHIPMTHD,TAXSCHID,CNTCPRSN,ADDRESS1,ADDRESS2,ADDRESS3,COUNTRY,CITY,STATE,ZIP,PHONE1,PHONE2,PHONE3,FAX,MODIFDT,CREATDDT,GPSFOINTEGRATIONID,INTEGRATIONSOURCE,INTEGRATIONID,CCode,DECLID,LOCNCODE,SALSTERR,USERDEF1,USERDEF2,ShipToName,Print_Phone_NumberGB,DEX_ROW_TS,DEX_ROW_ID FROM TB.dbo.RM00102 WITH ( NOLOCK) WHERE (ADDRESS1 = '3025 E NEW YORK ST' AND CUSTNMBR = '4438519' AND DEX_ROW_ID > 23506 OR ADDRESS1 = '3025 E NEW YORK ST' AND CUSTNMBR > '4438519' OR ADDRESS1 > '3025 E NEW YORK ST') ORDER BY ADDRESS1 ASC ,CUSTNMBR ASC ,DEX_ROW_ID ASC
(ADDRESS1 = '3025 E NEW YORK ST' AND CUSTNMBR = '4438519' AND DEX_ROW_ID > 23506 OR ADDRESS1 = '3025 E NEW YORK ST' AND CUSTNMBR > '4438519' OR ADDRESS1 > '3025 E NEW YORK ST')
makes no sense. 4438519 is NOT the customer I'm looking at.
Are we missing parenthesis )' OR (' around the ORs?
Shouldn't the CUSTNMBR = '4438519' be the customer in question?
*This post is locked for comments
I have the same question (0)We are hanging on this lookup as well!