Parcourir la Source

Improve print speed by removing unnused log table join.

Brett Credo il y a 8 ans
Parent
révision
6a0a520afb
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      BulkPrinting/BulkPrinting/Utility.cs

+ 1 - 2
BulkPrinting/BulkPrinting/Utility.cs

@@ -404,9 +404,8 @@ namespace BulkPrinting
404 404
             List<EventLog> LogEvents = new List<EventLog>();
405 405
 
406 406
             IList<PrintVoucher> VoucherRow = new List<PrintVoucher>();
407
-            using (var Command = db.CreateCommand("SELECT DISTINCT v.Id,v.SequenceNumber,v.Serial,v.EncryptedPIN,v.BatchId,b.ProductDescription,l.VoucherId From Voucher v LEFT JOIN Batch b on v.BatchId = b.Id LEFT JOIN Logs l ON v.Id = l.VoucherId AND l.EventType = @eventtype WHERE v.BatchId=@batch_id AND v.SequenceNumber BETWEEN @seqstartno AND @seqendno ORDER BY v.SequenceNumber",
407
+            using (var Command = db.CreateCommand("SELECT DISTINCT v.Id,v.SequenceNumber,v.Serial,v.EncryptedPIN,v.BatchId,b.ProductDescription From Voucher v LEFT JOIN Batch b on v.BatchId = b.Id WHERE v.BatchId=@batch_id AND v.SequenceNumber BETWEEN @seqstartno AND @seqendno ORDER BY v.BatchId, v.SequenceNumber",
408 408
                 new SQLiteParameter("@batch_id", BatchId),
409
-                new SQLiteParameter("@eventtype", VendorEvent.VendorEventType.PrintVoucher),
410 409
                 new SQLiteParameter("@seqstartno", StartSeqNo),
411 410
                 new SQLiteParameter("@seqendno", EndSeqNo)))
412 411
             {