Multiple Reads of Comment line

rthswrthsw Member Posts: 73
Hi there, i try to reduce the Serverrequests from Nav 4 SP3 on SQL2000. I am using the Profiler for Viewing Daatabase Access, especialy for reads. So i've found this Statement by opening the Comments from Customer (also Vendor,Item...).

SELECT * FROM "fin"."dbo"."Landefeld Druckluft$Comment Line" WHERE (("Table Name"=0 AND "No_"='10000' AND "Line No_">10000) OR ("Table Name"=0 AND "No_">'10000') OR ("Table Name">0)) AND (("No_"='10000'))
go
SELECT * FROM "fin"."dbo"."Landefeld Druckluft$Comment Line" WHERE (("Table Name"=0 AND "No_"='10000' AND "Line No_"<10000) OR ("Table Name"=0 AND "No_"<'10000') OR ("Table Name"<0)) AND (("No_"='10000'))
go

Navision allways fire this both triggers, also on calculating the Flowfield Comment.

For every single Request (no matter how big the selected Result set) the SQL-Server need betwen 109 and 120 reads, and this 4 times (2 times for opening the Form, 2 times for calculating the Flowfield.

Is there way to reduce the Reads for this type of Request?

I'Ve tried to use a scound Key (only No. because of high selectivity), use this clustered, re-defined the SQL key to No., Tablename, Line No., but allways there are the hundert reads for the comment line (sales line at the Subform of Orders behave also like this)

Comments

  • DenSterDenSter Member Posts: 8,305
    You could take the flowfield off of the form and only have a comments button. That should cut down the number of queries in half, but you would not have the different pictures on the button anymore.
  • rthswrthsw Member Posts: 73
    Thanks for this comment. The spot is not to half the reguests by reducing the funcitonality to half. I am wondering about the count of reads! Normaly, we hold between 3 and 10 Lines of Comments per Record. Customers between 1 (least) and about 10, Vendors between 0 and 5, G/L allways zero.

    But Navision / SQl allways reads between 106 (least) and 119 records. I am wondering about reducing this reads down to the estimated 0-10 Records.
Sign In or Register to comment.