<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>NQuery</title><link>http://www.codeplex.com/NQuery/Project/ProjectRss.aspx</link><description>NQuery is a relational query engine written in C&amp;#35;. It allows you to execute a SELECT query against .NET objects. It can use arrays, data sets, data tables or any other custom table binding. NQuery ...</description><item><title>New Post: Decimal and Date query error on dataset</title><link>http://www.codeplex.com/NQuery/Thread/View.aspx?ThreadId=33433</link><description>&lt;div style="line-height: normal;"&gt;terrajobst,&lt;br&gt;
&lt;br&gt;
Thanks for the response.&amp;nbsp; I will insert those 2 adjustments to my query and give it a run.&lt;br&gt;
&lt;/div&gt;</description><author>langc334</author><pubDate>Tue, 19 Aug 2008 12:26:00 GMT</pubDate><guid isPermaLink="false">New Post: Decimal and Date query error on dataset 20080819122600P</guid></item><item><title>New Post: Decimal and Date query error on dataset</title><link>http://www.codeplex.com/NQuery/Thread/View.aspx?ThreadId=33433</link><description>&lt;div style="line-height: normal;"&gt;Hi langc334,&lt;br&gt;
&lt;br&gt;
sorry for the late answer but this weekend I had to ship &lt;a href="http://www.codepex.com/CloneDetectiveVS"&gt;Clone Detective for Visual Studio&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
NQuery shares many characteristics with C# when it comes to implicit conversions and overload resolution. So if you want to compare a decimal with a double you have to convert one of the operands, e.g.&lt;br&gt;
&lt;blockquote&gt;Pay_Offset = &lt;strong&gt;TO_DECIMAL(&lt;/strong&gt;500.50&lt;strong&gt;)&lt;/strong&gt;&lt;br&gt;
&lt;/blockquote&gt;If you want to use date literals you have to use pound signs as a delimiter, e.g.&lt;br&gt;
&lt;blockquote&gt;Pay_Date = &lt;strong&gt;#&lt;/strong&gt;5/13/2008 12:00:00 PM&lt;strong&gt;#&lt;/strong&gt;&lt;br&gt;
&lt;/blockquote&gt;Here is the full repro source:&lt;br&gt;
&lt;blockquote&gt;public sealed class Customer&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public int C_ID;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Customer(int c_ID)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; C_ID = c_ID;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
public sealed class Payment&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public int P_C_ID;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public decimal Pay_Offset;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public DateTime Pay_Date;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Payment(int p_C_ID, decimal pay_Offset, DateTime pay_Date)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; P_C_ID = p_C_ID;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Pay_Offset = pay_Offset;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Pay_Date = pay_Date;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
private static void Main()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Customer&amp;gt; customers = new List&amp;lt;Customer&amp;gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; customers.Add(new Customer(1));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; customers.Add(new Customer(2));&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Payment&amp;gt; payments = new List&amp;lt;Payment&amp;gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; payments.Add(new Payment(1, 500.50m, new DateTime(2008, 5, 13, 12, 0, 0)));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; payments.Add(new Payment(2, 600.50m, DateTime.Now));&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DataContext dataContext = new DataContext();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataContext.Tables.Add(customers, &amp;quot;Customer&amp;quot;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataContext.Tables.Add(payments, &amp;quot;Payments&amp;quot;);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Query query = new Query();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.DataContext = dataContext;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.Text = @&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Payments&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&amp;nbsp;&amp;nbsp;&amp;nbsp; C_ID = P_C_ID&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AND&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Pay_Offset = TO_DECIMAL(500.50)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AND&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Pay_Date = #5/13/2008 12:00:00 PM#&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable table = query.ExecuteDataTable();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; table.TableName = &amp;quot;Result&amp;quot;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; table.WriteXml(Console.Out);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Output:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;DocumentElement&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &amp;lt;Result&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;C_ID&amp;gt;1&amp;lt;/C_ID&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;P_C_ID&amp;gt;1&amp;lt;/P_C_ID&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Pay_Offset&amp;gt;500.50&amp;lt;/Pay_Offset&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Pay_Date&amp;gt;2008-05-13T12:00:00+02:00&amp;lt;/Pay_Date&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &amp;lt;/Result&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;/DocumentElement&amp;gt;&lt;br&gt;
}&lt;br&gt;
&lt;/blockquote&gt;Kind Regards,&lt;br&gt;
Immo Landwerth&lt;br&gt;
&lt;/div&gt;</description><author>terrajobst</author><pubDate>Mon, 18 Aug 2008 08:18:25 GMT</pubDate><guid isPermaLink="false">New Post: Decimal and Date query error on dataset 20080818081825A</guid></item><item><title>New Post: Prepared statements and indexing</title><link>http://www.codeplex.com/NQuery/Thread/View.aspx?ThreadId=33344</link><description>&lt;div style="line-height: normal;"&gt;Hi Igor,&lt;br&gt;
&lt;br&gt;
first of all I would like to say that I really appreciate your feedback.&lt;br&gt;
&lt;br&gt;
Basically, NQuery uses some kind of prepared statements. If you specify a query and execute it NQuery will first check if your query has already been compiled. If not, it will compile it. Here compilation means it will find an execution plan for your query, perform some optimization strategies and finally NQuery will compile all expression in the plan down to MSIL.&lt;br&gt;
&lt;br&gt;
In most queries the compilation time will be much larger than the execution time. You can check this by executing the queries twice. The second execution will typically be much faster.&lt;br&gt;
&lt;br&gt;
However, as you already found out using typed objects is pretty slow. The reason is that although NQuery uses compilation in the execution plan it does not use compilation to obtain the initial values out of a table's row -- that it the responsibility of a TableProvider/ColumnBinding. If you add an IEnumerable&amp;lt;T&amp;gt; to your data context NQuery will use a registered property provider to determine the set of properties T is supposed to have. If you haven't registered your own property provider NQuery will use the ReflectionProvider. To make a long story shot: in this release ReflectionProvider uses simple reflection to pass values to NQuery's query executor. And that it is pretty slow.&lt;br&gt;
&lt;br&gt;
The easiest workaround for this is to replace the default ReflectionProvider by one that also generates MSIL to read the values. Below you will find sample code that does that. Please note that it uses Linq so you will need .NET Framework 3.5. If this is not an option for you I will produce a version that uses plain old Reflection.Emit -- but that is a bit more work, so I haven't done it yet :-)&lt;br&gt;
&lt;blockquote&gt;internal sealed class FastPropertyProvider : ReflectionProvider&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;private delegate object PropertyInvoker(object instance);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;private sealed class LambdaPropertyBinding : PropertyBinding&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private PropertyInfo _propertyInfo;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private PropertyInvoker _propertyInvoker;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public LambdaPropertyBinding(PropertyInfo propertyInfo, PropertyInvoker propertyInvoker)&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_propertyInfo = propertyInfo;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_propertyInvoker = propertyInvoker;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public override string Name&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;get { return _propertyInfo.Name; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public override object GetValue(object instance)&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return _propertyInvoker(instance);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public override Type DataType&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;get { return _propertyInfo.PropertyType; }&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;protected override PropertyBinding CreateProperty(PropertyInfo propertyInfo)&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ParameterExpression parameter = Expression.Parameter(typeof(object), &amp;quot;inst&amp;quot;);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;UnaryExpression castParameterToInstanceType = Expression.Convert(parameter, propertyInfo.DeclaringType);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MemberExpression propertyAccess = Expression.Property(castParameterToInstanceType, propertyInfo);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;UnaryExpression castResultToObject = Expression.Convert(propertyAccess, typeof(object));&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LambdaExpression lambda = Expression.Lambda(typeof(PropertyInvoker), castResultToObject, parameter);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PropertyInvoker compiledDelegate = (PropertyInvoker)lambda.Compile();&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return new LambdaPropertyBinding(propertyInfo, compiledDelegate);&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;/blockquote&gt;To replace the default ReflectionProvider by the faster one you simply have to set the DefaultProvider on your data context:&lt;br&gt;
&lt;blockquote&gt;query.DataContext.MetadataContext.PropertyProviders.DefaultValue = new FastPropertyProvider();&lt;br&gt;
&lt;/blockquote&gt;Please note that you must do this before you add any table to the data context -- otherwise theses tables will still use the slower ReflectionProvider.&lt;br&gt;
&lt;br&gt;
I suggest you try this before we discuss more sophisticated optimization strategies. However, if you are still not satisfied with the performance please let me know!&lt;br&gt;
&lt;br&gt;
Kind Regards,&lt;br&gt;
Immo Landwerth
&lt;/div&gt;</description><author>terrajobst</author><pubDate>Fri, 15 Aug 2008 16:54:01 GMT</pubDate><guid isPermaLink="false">New Post: Prepared statements and indexing 20080815045401P</guid></item><item><title>New Post: Decimal and Date query error on dataset</title><link>http://www.codeplex.com/NQuery/Thread/View.aspx?ThreadId=33433</link><description>&lt;div style="line-height: normal;"&gt;I am running a query against a VB .NET dataset with multiple tables.&amp;nbsp; I get two errors when I run the query.&amp;nbsp; One is that I cannot compare a double to a decimal and the other a string to a date.&amp;nbsp; Here are the two samples of how the query looks.&lt;br&gt;
&lt;br&gt;
SELECT * FROM Customer, Payments&lt;br&gt;
WHERE C_ID = P_C_ID and Pay_Offset = 500.50 and Pay_Date = '5/13/2008 12:00:00 PM'&lt;br&gt;
&lt;br&gt;
Pay_Offset is a decimal(18, 2) type column in the table and Pay_date is a datetime type column.&amp;nbsp; The dataset is filled with data from a database that declares these types.&lt;br&gt;
&lt;br&gt;
I have tried using quotes and no quotes around the dollar amount and it will change from can't compare decimal to double to can't compare decimal to string.&amp;nbsp; The date value I have tried with and without the PM and I still receive the error.&amp;nbsp; Am I putting the values in wrong in the query?&amp;nbsp; Is this something with how NQuery handles values that it auto converts the dollar amount to a double even though the field is decimal?&lt;br&gt;
&lt;/div&gt;</description><author>langc334</author><pubDate>Wed, 13 Aug 2008 12:56:08 GMT</pubDate><guid isPermaLink="false">New Post: Decimal and Date query error on dataset 20080813125608P</guid></item><item><title>New Post: Prepared statements and indexing</title><link>http://www.codeplex.com/NQuery/Thread/View.aspx?ThreadId=33344</link><description>&lt;div style="line-height: normal;"&gt;&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Hi!&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;This is my very first post; therefore I must congratulate you on the remarkable product! I could spend few pages describing how fascinated I’m :) NQuery is simply impressive!&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;I have two questions/suggestions. I would like to describe shortly motivation for them.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;I work currently on a huge and serious predevelopment project that has few particular demands. One of demands is ability to query object space in a fast and convenient way. After several workshops it is decided to use SQL as a language (convenient) in combination with an in-memory database (speed). Keep in mind that this is not ‘database application’. We are copying currently parts of our object space to in-memory database in order to query it efficiently. (BDW, we use QuiLogic &lt;a href="http://www.quilogic.cc/"&gt;www.quilogic.cc&lt;/a&gt; as in-memory DB).&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Concept worked great (fast + convenient) until we noticed that in real life scenarios database memory overhead is simply too big! We tried several workarounds but without real success.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;And then we found NQuery :)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;After few tests I can say NQuery is exactly what we need! But... it’s too slow :(&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Here is the speed comparison (time is in milliseconds) between NQuery upon List&lt;/span&gt;&lt;span style="font-family:Arial"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="font-family:Arial"&gt;and QuiLogic in-memory database on three simple queries:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;SELECT Id, ProgramName FROM CdlComponent&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - Result: 95.000 rows&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - QLDB:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - NQuery:&amp;nbsp;&amp;nbsp;&amp;nbsp; 410 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;SELECT Id, ProgramName FROM CdlComponent&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;WHERE ProgramName = 'Input'&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - Result: 2.300 rows&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - QLDB:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - NQuery:&amp;nbsp;&amp;nbsp; 230 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;SELECT Id, ProgramName FROM CdlComponent&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;WHERE ProgramName LIKE 'I%'&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - Result: 2.300 rows&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - QLDB:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp; - NQuery:&amp;nbsp;&amp;nbsp; 610 ms&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Of course, generic query engine can’t be compared with fully optimized in-memory relational DB! But this comparison produced two simple ideas.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;First, DB uses prepared statements. There is a significant difference in query speed with and without prepared statements.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Second, DB uses indexes.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;So, my question is - is it possible to create something like this:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;NQuery with prepared statements + indexing mechanism (something like i4o http://www.codeplex.com/i4o)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;If it is, is it possible to give rough estimation, how faster above queries could be.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Thanks!&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 0pt"&gt;&lt;span style="font-family:Arial"&gt;Igor&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>ironcev</author><pubDate>Tue, 12 Aug 2008 08:01:35 GMT</pubDate><guid isPermaLink="false">New Post: Prepared statements and indexing 20080812080135A</guid></item><item><title>Source code checked in, #34246</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Updated &amp;#34;How to build.txt&amp;#34;.</description><author>terrajobst</author><pubDate>Sun, 06 Jul 2008 20:06:36 GMT</pubDate><guid isPermaLink="false">Source code checked in, #34246 20080706080636P</guid></item><item><title>Source code checked in, #34245</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Added source control bindings for setup project.</description><author>terrajobst</author><pubDate>Sun, 06 Jul 2008 20:00:50 GMT</pubDate><guid isPermaLink="false">Source code checked in, #34245 20080706080050P</guid></item><item><title>Source code checked in, #34244</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Refactored build process.&amp;#13;&amp;#10;Changed the way documentation is generated. Now both a CHM and HxS are produced.&amp;#13;&amp;#10;Added setup.</description><author>terrajobst</author><pubDate>Sun, 06 Jul 2008 19:59:21 GMT</pubDate><guid isPermaLink="false">Source code checked in, #34244 20080706075921P</guid></item><item><title>Project License Changed</title><link>http://www.codeplex.com/Nquery/license?LicenseHistoryId=13140</link><description>Microsoft Public License &amp;#40;Ms-PL&amp;#41;&amp;#13;&amp;#10;&amp;#13;&amp;#10;This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.&amp;#13;&amp;#10;&amp;#13;&amp;#10;1. Definitions&amp;#13;&amp;#10;&amp;#13;&amp;#10;The terms &amp;#34;reproduce,&amp;#34; &amp;#34;reproduction,&amp;#34; &amp;#34;derivative works,&amp;#34; and &amp;#34;distribution&amp;#34; have the same meaning here as under U.S. copyright law.&amp;#13;&amp;#10;&amp;#13;&amp;#10;A &amp;#34;contribution&amp;#34; is the original software, or any additions or changes to the software.&amp;#13;&amp;#10;&amp;#13;&amp;#10;A &amp;#34;contributor&amp;#34; is any person that distributes its contribution under this license.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#34;Licensed patents&amp;#34; are a contributor&amp;#39;s patent claims that read directly on its contribution.&amp;#13;&amp;#10;&amp;#13;&amp;#10;2. Grant of Rights&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;A&amp;#41; Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;B&amp;#41; Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and&amp;#47;or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.&amp;#13;&amp;#10;&amp;#13;&amp;#10;3. Conditions and Limitations&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;A&amp;#41; No Trademark License- This license does not grant you rights to use any contributors&amp;#39; name, logo, or trademarks.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;B&amp;#41; If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;C&amp;#41; If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;D&amp;#41; If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.&amp;#13;&amp;#10;&amp;#13;&amp;#10;&amp;#40;E&amp;#41; The software is licensed &amp;#34;as-is.&amp;#34; You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.</description><author></author><pubDate>Sun, 06 Jul 2008 13:13:51 GMT</pubDate><guid isPermaLink="false">Project License Changed 20080706011351P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Renamed NQuery.Gui.&amp;#42; to NQuery.Demo.&amp;#42;</description><author>terrajobst</author><pubDate>Sun, 01 Jun 2008 13:44:23 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080601014423P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Updated welcome page in demo application.</description><author>terrajobst</author><pubDate>Sun, 01 Jun 2008 13:13:31 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080601011331P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Updated &amp;#34;How to build.txt&amp;#34;.</description><author>terrajobst</author><pubDate>Sun, 01 Jun 2008 13:02:09 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080601010209P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Added smart member lists tests.&amp;#13;&amp;#10;Added many other tests after analyzing the code coverage results.</description><author>terrajobst</author><pubDate>Sun, 01 Jun 2008 12:57:11 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080601125711P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Removed obsolete batch files.</description><author>terrajobst</author><pubDate>Sun, 01 Jun 2008 12:50:50 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080601125050P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Removed obsolete FxCop folder.</description><author>terrajobst</author><pubDate>Sat, 31 May 2008 10:27:27 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080531102727A</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Updated sandcastle documentation project files so that it looks better with the VS2005 style.</description><author>terrajobst</author><pubDate>Sun, 25 May 2008 20:16:21 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080525081621P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Migrated samples project to VS2008.&amp;#13;&amp;#10;Fixed compiler errors in samples.</description><author>terrajobst</author><pubDate>Thu, 22 May 2008 12:56:46 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080522125646P</guid></item><item><title>CLOSED ISSUE: Query error when deleted rows in DataTable</title><link>http://www.codeplex.com/Nquery/WorkItem/View.aspx?WorkItemId=14823</link><description>Running a query against a data table results in an error&amp;#58;&lt;br /&gt;&lt;br /&gt;DataTable dataTable &amp;#61; new DataTable&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;ID&amp;#34;, typeof&amp;#40;int&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;Name&amp;#34;, typeof&amp;#40;string&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Rows.Add&amp;#40;1, &amp;#34;Name1&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Rows.Add&amp;#40;2, &amp;#34;Name2&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Rows.Add&amp;#40;3, &amp;#34;Name3&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.AcceptChanges&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Rows&amp;#91;1&amp;#93;.Delete&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.TableName &amp;#61; &amp;#34;Test&amp;#34;&amp;#59;&lt;br /&gt; &lt;br /&gt;Query query &amp;#61; new Query&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;query.Text &amp;#61; &amp;#34;SELECT &amp;#42; FROM Test&amp;#34;&amp;#59;&lt;br /&gt;query.DataContext.Tables.Add&amp;#40;dataTable&amp;#41;&amp;#59;&lt;br /&gt; &lt;br /&gt;DataTable resultDataTable &amp;#61; query.ExecuteDataTable&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;resultDataTable.TableName &amp;#61; &amp;#34;Result&amp;#34;&amp;#59;&lt;br /&gt;resultDataTable.WriteXml&amp;#40;Console.Out&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;The error is&amp;#58;&lt;br /&gt;&lt;br /&gt;Unhandled Exception&amp;#58; NQuery.RuntimeException&amp;#58; ColumnBinding.GetValue&amp;#40;&amp;#41; threw an exception. ---&amp;#62; System.Data.DeletedRowInaccessibleException&amp;#58; Deleted row informa&lt;br /&gt;tion cannot be accessed through the row.&lt;br /&gt;   at System.Data.DataRow.GetDefaultRecord&amp;#40;&amp;#41;&lt;br /&gt;   at System.Data.DataRow.get_Item&amp;#40;DataColumn column, DataRowVersion version&amp;#41;&lt;br /&gt;   at NQuery.Runtime.DataColumnBinding.GetValue&amp;#40;Object row&amp;#41;&lt;br /&gt;   at NQuery.Runtime.ExecutionPlan.TableIterator.Read&amp;#40;&amp;#41;&lt;br /&gt;   --- End of inner exception stack trace ---&lt;br /&gt;   at NQuery.Runtime.ExecutionPlan.TableIterator.Read&amp;#40;&amp;#41;&lt;br /&gt;   at NQuery.Runtime.ExecutionPlan.StatisticsIterator.Read&amp;#40;&amp;#41;&lt;br /&gt;   at NQuery.Runtime.ExecutionPlan.ResultIterator.Read&amp;#40;&amp;#41;&lt;br /&gt;   at NQuery.Query.ExecuteDataTable&amp;#40;&amp;#41;&lt;br /&gt;   at ConsoleApplication2.Program.Main&amp;#40;&amp;#41; in K&amp;#58;&amp;#92;ConsoleApplication2&amp;#92;ConsoleApplication2&amp;#92;Program.cs&amp;#58;line 46&lt;br /&gt;&lt;br /&gt;I guess this error can simply resolved by skipping all rows that have a RowState of DataRowState.Deleted.&lt;br /&gt;</description><author>terrajobst</author><pubDate>Sun, 18 May 2008 18:52:53 GMT</pubDate><guid isPermaLink="false">CLOSED ISSUE: Query error when deleted rows in DataTable 20080518065253P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Fixed WI-14823. Added test to verify behavior.</description><author>terrajobst</author><pubDate>Sun, 18 May 2008 18:52:51 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080518065251P</guid></item><item><title>Source code checked in</title><link>http://www.codeplex.com/Nquery/SourceControl/ListDownloadableCommits.aspx</link><description>Replaced FxCop by static code analysis feature of Visual Studio Team System.</description><author>terrajobst</author><pubDate>Sun, 18 May 2008 18:34:36 GMT</pubDate><guid isPermaLink="false">Source code checked in 20080518063436P</guid></item></channel></rss>