Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Is SQLite.Net Table method loading the entire table into a collection?

$
0
0

I've been using Praeclarum's SQLite.Net ORM for quite a long time, and my main method for querying from the database is the Table method. But today I realized that in the Xamarin documentation about using Using SQLite.Net ORM the following is stated:

The entire table is loaded into a collection prior to the Linq query executing, so performance of these queries could be slow for large amounts of data.

With the following example:

var apple = from s in db.Table<Stock>()
    where s.Symbol.StartsWith ("A")
    select s;
Console.WriteLine ("-> " + apple.FirstOrDefault ().Symbol);

I'm pretty sure that the entire table is not loaded, and by looking at the code it's fairly clear that the lambda expression is being parsed and converted to a SQL statement.

So... is the Xam's doc or sample wrong? Is there any case where the entire table is loaded? Was it added to a recent version (doesn't seems to) and the doc is outdated?

Can anyone throw some light?

Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>