- March 24, 2007
- 12,073
- 7,459
- Home Country
- Germany
- Moderator
- #81
I need to explain the queries above: they are filters for "Album" covers, where not a single MediaItem is queried, but the thumbnail of first MediaItem that has the requested album name.
That's why I introduced LIMIT and OFFSET: album query returns 20 titles/thumbns, but I only need the first.
I already planned to do this "paging" inside SQL layer, there is a comment and TODO. Problem is, that SQLCE has an error when using JOINS and LIMIT in a query. So maybe we create an extended DB interface for "paging" support, if the DB plugins doesn't support it, we fall back to current way (IDataReader.Skip().Take(), which is slower).
The "paging" support is also a main feature for @Valk 's data source virtualization, so the DB can return only the needed range of a query.
That's why I introduced LIMIT and OFFSET: album query returns 20 titles/thumbns, but I only need the first.
I already planned to do this "paging" inside SQL layer, there is a comment and TODO. Problem is, that SQLCE has an error when using JOINS and LIMIT in a query. So maybe we create an extended DB interface for "paging" support, if the DB plugins doesn't support it, we fall back to current way (IDataReader.Skip().Take(), which is slower).
The "paging" support is also a main feature for @Valk 's data source virtualization, so the DB can return only the needed range of a query.