mattdaddyjuice
Member
- Joined
- Jan 15, 2009
- Messages
- 21
- Programming Experience
- 5-10
I am working with an inventory table in a database that contains over 900000 records. I am coding in VB.NET and my select statement can take up to 15-20 seconds to retrieve info based on the barcode that has been scanned. Here is the select statement I am using:
code = txtBarcode.Text
Dim da3 As New OleDb.OleDbDataAdapter("SELECT TOP 1 * FROM Inventory WHERE Barcode = '" & code & "' ", Con)
If the barcode scanned is one of the first few thousand records, it will give me the info in a second or two, but if it is one of the bottom records it slows down by at least 10 seconds. Anyone got any ideas? Thanks!
code = txtBarcode.Text
Dim da3 As New OleDb.OleDbDataAdapter("SELECT TOP 1 * FROM Inventory WHERE Barcode = '" & code & "' ", Con)
If the barcode scanned is one of the first few thousand records, it will give me the info in a second or two, but if it is one of the bottom records it slows down by at least 10 seconds. Anyone got any ideas? Thanks!