c# - SQLite-net Table<>() method call performance -


i using sqlite-net library xamain , have question. call better or faster?

var item = sqliteconnection.table<user>().firstordefault(e => e.id == myobject.id); 

or

var item = sqliteconnection.table<user>().where(e => e.id == myobject.id).firstordefault(); 

either fine.

they both run lazily - if source list has million items, tenth item matches both iterate 10 items source.

performance should identical , difference totally insignificant.

but

i started getting "the wait operation timed out." using where(query).firstordefault() on large dataset. when changed firstordefault(query) stopped seeing it

the difference when compare 2 approaches working out 1ms on 150,000 items (not 1ms each item, it's 1ms 150,000). based on 500 x 1,000 items query that's 0.003ms per day. it's not significant

but prefer firstordefault(query)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -