Anyone know why getting the row count from an sqlite query result set or cursor takes so long?
I have a query that 99% of the time only returns 1 row but I do need to check for zero or greater than one so I tried using resultSet.RowCount, it takes 8 seconds to get the row count value
The above code displays 8325 ms
If I loop though the result set and count the rows manually it takes 0 ms
Why is the built in function so slow? I am a little worried as I use RowCount all over the place, I haven't checked but I guess it takes this long everywhere I use it...
Thanks
Nibbo
I have a query that 99% of the time only returns 1 row but I do need to check for zero or greater than one so I tried using resultSet.RowCount, it takes 8 seconds to get the row count value
B4X:
Dim l1 As Long = DateTime.Now
Dim iRows As Int = rs.RowCount
Dim l2 As Long = DateTime.Now
Log((l2-l1) & " ms")
The above code displays 8325 ms
If I loop though the result set and count the rows manually it takes 0 ms
Why is the built in function so slow? I am a little worried as I use RowCount all over the place, I haven't checked but I guess it takes this long everywhere I use it...
Thanks
Nibbo