[sqlite] First-N query time scaling with table size

2015-04-24 Thread Keith Medcalf
Your query has to visit every row of table d and execute the correlated subquery multiple times. You need to devise a way to do this only once for each d.m and then join that table back into your query. >sqlite < demo.sql .eqp on .timer on CREATE TABLE d ( m INT NOT NULL, t INT NOT

[sqlite] First-N query time scaling with table size

2015-04-24 Thread Richard Hipp
On 4/24/15, John Pitney wrote: > > I've made a self-contained example, where N = 20 and M = 200. Is > there a way to write the final select statement so that its completion > time does not grow with M? > > SELECT m, n_points, t_csv, v_csv, max_rowid FROM > (SELECT tt.m AS "m", > count(v) AS

[sqlite] First-N query time scaling with table size

2015-04-24 Thread John Pitney
On Fri, Apr 24, 2015 at 8:22 PM, Keith Medcalf wrote: > > Your query has to visit every row of table d and execute the correlated > subquery multiple times. > > You need to devise a way to do this only once for each d.m and then join that > table back into your query. > >>sqlite < demo.sql >

[sqlite] First-N query time scaling with table size

2015-04-24 Thread John Pitney
On Fri, Apr 24, 2015 at 7:56 PM, Simon Slavin wrote: > > On 25 Apr 2015, at 1:12am, John Pitney wrote: > >> The results are the following, on a Windows 7 64-bit platform: > > Please do ANALYZE, then check your times again. Inserting an ANALYZE just before the final SELECT statement caused run

[sqlite] First-N query time scaling with table size

2015-04-24 Thread John Pitney
In my application, values v associated with metrics m and times t are inserted into one big table d. Another process opens the same database and looks in d for metrics with at least N entries, sorted by t. I'm finding that the time to complete the query grows linearly with the row count M of

[sqlite] Thoughts on storing arrays of complex numbers (Solved)

2015-04-24 Thread Drago, William @ CSG - NARDA-MITEQ
All, I always learn something from this group even when the answers don't directly solve my problem, and for that I am always thankful. Perhaps I should have included more information about what I'm trying to accomplish and/or phrased the question differently. That might have saved some time

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Keith Medcalf
Create table ComplexNumbers ( id integer primary key, real real not null default 0, imag real not null default 0 ); Then, where ever you need to use a complex number you store it in the complex number table and store the id of that number instead. For example: create table Boxes (

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Dominique Devienne
On Fri, Apr 24, 2015 at 3:37 PM, Drago, William @ CSG - NARDA-MITEQ < William.Drago at l-3com.com> wrote: > I'm trying to avoid re-inventing the wheel. Is there a best or generally > accept way to store arrays of complex numbers? I'm considering the > following: > > I could have two blob fields

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Drago, William @ CSG - NARDA-MITEQ
All, I'm trying to avoid re-inventing the wheel. Is there a best or generally accept way to store arrays of complex numbers? I'm considering the following: I could have two blob fields in my table. One for the real parts and one for the imaginary. (I don't like this.) Or, I could use a single

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread James K. Lowden
On Fri, 24 Apr 2015 13:37:40 + "Drago, William @ CSG - NARDA-MITEQ" wrote: > I'm trying to avoid re-inventing the wheel. Is there a best or > generally accept way to store arrays of complex numbers? A table in First Normal Form has no repeating groups. That means no row has an array of

[sqlite] Thoughts on storing arrays of complex numbers (Solved)

2015-04-24 Thread Scott Hess
On Fri, Apr 24, 2015 at 12:01 PM, Drago, William @ CSG - NARDA-MITEQ wrote: > Since the data is received from the analyzer as an array of > real/imaginary pairs (R,I,R,I,R,I,R,I...), 3202 elements total, > that's how I will blob and store it. This is the simplest way > to add it to the database.

[sqlite] building SQLite DLL with Visual C++

2015-04-24 Thread Jay Smith
Thanks Bill I got in a hurry and was trying to follow the book. I have never used C++ so the subject line is wrong. I am now looking into NuGet and will get back if I need more help (and I am sure I will.) Jay On Thu, Apr 23, 2015 at 4:08 PM, Drago, William @ CSG - NARDA-MITEQ < William.Drago at

[sqlite] How do non-SQLite DBMS communicate?

2015-04-24 Thread Drago, William @ CSG - NARDA-MITEQ
James, Howard, and Simon, Thank you for your replies. They were very helpful and gave me the information I needed. -- Bill Drago Senior Engineer L3 Narda-MITEQ 435 Moreland Road Hauppauge, NY 11788 631-272-5947 / William.Drago at L-3COM.com > -Original Message- > From:

[sqlite] building SQLite DLL with Visual C++

2015-04-24 Thread Jay Smith
Thanks Adam I will take a look Jay On Thu, Apr 23, 2015 at 4:19 PM, Adam Devita wrote: > Good day, > I don't work in VB, so I can't help you in specifics on that. A quick > search on a search engine pops up some videos on how to use sqlite in > a Visual Basic project. The archives of this

[sqlite] Upgraded 1.0.60.0 to 1.0.96.0

2015-04-24 Thread Steven M. McNeese
So I removed all referenced to version 1.0.96.0 and added in version 1.0.60.0 currently being used in production for the .Net 2.0 version of the application. So far I have not seen the errors. So it appears to be an incompatibility issue between the later version of System.Data.Sqlite and the

[sqlite] Upgraded 1.0.60.0 to 1.0.96.0

2015-04-24 Thread Steven M. McNeese
Thanks for the reply Joe. I am just confused at what could be different between the two version of the data provider or two version of .Net. Something has changed that is causing this because it was not user code. Since the project was migrated from .net 2 to .net 4.5, I suspect it is has to do

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Jim Callahan
>I could have two blob fields in my table. One for the real parts > and one for the imaginary. (I don't like this.) Could you be more specific about what is not to like? A. Does it limit your ability to use SQL? B. Does it cause problems for the language interface? C. Is it harder to do data

[sqlite] Upgraded 1.0.60.0 to 1.0.96.0

2015-04-24 Thread Joe Mistachkin
Steven M. McNeese wrote: > > Is it possible to get versions of Sqlite between 1.0.60.0 and the > latest release so I can try to isolate where the issue starts? > It is unlikely that the issue is with the core System.Data.SQLite itself. It very carefully follows the best-practices for IDisposable

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Steven M. McNeese
I would serialize to JSON and store as a string. -Original Message- From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Drago, William @ CSG - NARDA-MITEQ Sent: Friday, April 24, 2015 8:38 AM To: General Discussion of

[sqlite] Integrating sqlite with Core Data and iCloud

2015-04-24 Thread Simon Slavin
On 24 Apr 2015, at 6:59am, Jeff M wrote: > I don't need to map SQLite to iCloud -- I only need to map SQLite to Core > Data. Core Data then takes care of the iCloud issues. I imagine you'd do that by writing a VFS which used Core Data for storage. Core Data could store your data in any of

[sqlite] Upgraded 1.0.60.0 to 1.0.96.0

2015-04-24 Thread Joe Mistachkin
Steven M. McNeese wrote: > > I upgraded an old .net 2.0 application using System.Data.Sqlite v 1.0.60.0 > to .net 4.5 using system.data.sqlite v 1.0.96.0. The application started > getting random exceptions when access the database using datsets. See > below: > The only time that

[sqlite] Upgraded 1.0.60.0 to 1.0.96.0

2015-04-24 Thread Steven M. McNeese
I upgraded an old .net 2.0 application using System.Data.Sqlite v 1.0.60.0 to .net 4.5 using system.data.sqlite v 1.0.96.0. The application started getting random exceptions when access the database using datsets. See below: System.ApplicationException: Cannot access a disposed object.

[sqlite] Thoughts on storing arrays of complex numbers

2015-04-24 Thread Scott Doctor
If you are working with linear algebra type matrices, then simply make a column that represents each element. For example, a Jones matrix which is 2x2 would have four columns. Then each set of matrices are represented by a row. Best way to handle is to visualizes how you would use the

[sqlite] Integrating sqlite with Core Data and iCloud

2015-04-24 Thread Jeff M
On Apr 23, 2015, at 3:51 PM, Simon Slavin wrote: > > On 23 Apr 2015, at 9:29pm, Jeff M wrote: > >> Has there been any discussion about integrating sqlite with Apple's iCloud, >> either by using Apple's Core Data as the Virtual Machine's database engine >> (so the VM would operate on Core