Query execution takes longer time(10sec) with System.Data.Sqlite and the same executes faster(1sec) with System.Data.Sqlite version dll, but my customer is willing to use the latest dll as there is no support for old version.

Query:SELECT * FROM  Table1 INNER JOIN Table2 ON Table1.Id = Table2.Id  WHERE 1=1  AND (Table2.value1=1 AND Table2.value2=1) ORDER BY DateTime DESC, Number DESC LIMIT 50 OFFSET 117050 ;

Kindly provide the solution.