This project is read-only.
1
Vote

Allow LINQ queries to execute on server side by adding ObjectSource.From(IQueryable) overload and API for SELECT INTO .. AND INSERT INTO .. SELECT FROM ...

description

Allow LINQ queries to execute on server side by adding ObjectSource.From(IQueryable) overload.

Any code that accesses dataSource parameter of ObjectSource.From(IQueryable) should not cast it to IEnumerable or use ToList(), ToArray() or AsEnumerable() on it. This way LINQ will run server side.

Going one step further it may be better not to enumerate IQueryable dataSource parameter at all, but rather extract SQL from the parameter and pass it into SqlSource.FromQuery().

Currently SqlSource.FromQuery() itself enumerates rows in the result-set, which causes those rows to be loaded into RAM of both RDBMS engine and a .NET process executing Fluent ETL.
It would be better to provide API options not to load all those rows into .NET process RAM, but rather use "select into ..." or "insert into .. select from .." techniques (see http://msdn.microsoft.com/en-us/library/aa225219%28v=sql.80%29.aspx and http://stackoverflow.com/questions/25969/sql-insert-into-values-select-from).

comments