Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Keith Medcalf
> The major unexpected thing here is how SQLite deals with a case where > two different connections (which may be from different apps on > different computers) both have uncommitted changes. I think > explaining things using this as the key point may make explaining the > other aspects

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Keith Medcalf
Of course, the behaviour is not actually "undefined" -- it is perfectly determinable and entirely predictable and reasonable. However, if one does not understand the factors which determine the behaviour then, for you, the behaviour is undefined. In other words, if one does not know what

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread James K. Lowden
On Fri, 12 Jul 2013 14:25:36 -0400 Igor Tandetnik wrote: > >it is very much SQLite's job to prevent logical > > programming errors from corrupting the data. > > Define "the data". The database file remains perfectly intact, no > corruption there. Your internal state might

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread James K. Lowden
On Fri, 12 Jul 2013 16:02:37 -0400 Richard Hipp wrote: > On Fri, Jul 12, 2013 at 3:01 PM, Igor Tandetnik > wrote: > > > On 7/12/2013 12:30 PM, James K. Lowden wrote: > > > >> The documented behavior is - if you modify the data as you iterate > >>> over that

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Simon Slavin
On 12 Jul 2013, at 9:02pm, Richard Hipp wrote: > Proposed documentation enhancement here: > http://www.sqlite.org/draft/isolation.html I hope you don't mind that I posted this publicly. It's a bit strong for a public forum, but I suspect that other readers of this forum

Re: [sqlite] SQLite Use of Indexes

2013-07-12 Thread James K. Lowden
On Mon, 8 Jul 2013 15:32:21 -0400 "peter korinis" wrote: > . a CLAIMS table = 43M rows with indices on claim_no and > stateCounty code; and > > . a LINE table = 85M rows with indices on claim_no and HCPCS > (a 5 char text code) > > . Have run

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Richard Hipp
On Fri, Jul 12, 2013 at 3:01 PM, Igor Tandetnik wrote: > On 7/12/2013 12:30 PM, James K. Lowden wrote: > >> The documented behavior is - if you modify the data as you iterate >>> over that same data, the results are unpredictable. >>> >> >> Where does it say that? >> > > You

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Igor Tandetnik
On 7/12/2013 12:30 PM, James K. Lowden wrote: The documented behavior is - if you modify the data as you iterate over that same data, the results are unpredictable. Where does it say that? You got me here. The behavior doesn't appear to be documented, and it probably should. The closest I

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Igor Tandetnik
On 7/12/2013 12:30 PM, James K. Lowden wrote: On Mon, 08 Jul 2013 00:37:55 -0400 Igor Tandetnik wrote: I don't believe it's SQLite's job to ensure the programmer doesn't shoot herself in the foot. After all, you don't expect, say, the C++ compiler to prevent you from

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Drake Wilson
Quoth "James K. Lowden" , on 2013-07-12 12:30:13 -0400: > as the first one reads it. In fact, I'd be interested if you could > point to a single standard C library function that, when called > out-of-sequence, doesn't return an error but permits the process to > proceed

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread Simon Slavin
On 12 Jul 2013, at 5:30pm, James K. Lowden wrote: > There is no "SQLITE_OK_BUT_YOU_ARE_ON_YOUR_OWN" afaik. This is the best idea ever. I vote it gets included in SQLite4. Simon. ___ sqlite-users mailing list

Re: [sqlite] Another 2 questions about SQLite

2013-07-12 Thread James K. Lowden
On Mon, 08 Jul 2013 00:37:55 -0400 Igor Tandetnik wrote: > I don't believe it's SQLite's job to ensure the programmer doesn't > shoot herself in the foot. After all, you don't expect, say, the C++ > compiler to prevent you from destroying an object while another part > of the

Re: [sqlite] Array Accessing in SQLite3

2013-07-12 Thread Jay A. Kreibich
On Fri, Jul 12, 2013 at 12:43:16PM +0530, techi eth scratched on the wall: > I have query regarding accessing single & multidimensional array in SQLite3. > > Example: I have created table with (test [10] INTEGER, name [50] TEXT). > > How do I pass a value to insert each element of array? > >

Re: [sqlite] Understanding how data is stored and the index is managed

2013-07-12 Thread Michael Black
One more test I would is first principles. Load 1200 records and just do "select * from items" -- you aren't going to get any faster than that. Then add the index query. You should find a performance knee as you add records (try adding them in powers of 2). To test I would use "select * from items

Re: [sqlite] Understanding how data is stored and the index is managed

2013-07-12 Thread Mohit Sindhwani
Hi Simon, As always thanks for your prompt reply. My answers inline. On 12/7/2013 1:11 PM, Simon Slavin wrote: On 12 Jul 2013, at 5:19am, Mohit Sindhwani wrote: We could try to renumber the IDs so that all the IDs are in sequence, but that is not the easiest thing to do.

Re: [sqlite] Performance regression since 3.7.15

2013-07-12 Thread Elan Feingold
Just to update, we're attempting to move to a 3.8.0 snapshot, and we've run into another possibly pathological case you might want to be aware of (same schema). The query is: select count(*) from metadata_items as leaves join metadata_items as parents on leaves.parent_id=parents.id left join

Re: [sqlite] Array Accessing in SQLite3

2013-07-12 Thread Hick Gunter
Please read up on SQL, there are numerous tutorials available online. There is no "array" in SQL other than that a table may be considered as an array of records. Your example creates a table with two fields named 'test' and 'name' and with declared datatypes of '10' and '50' respectively.

[sqlite] Array Accessing in SQLite3

2013-07-12 Thread techi eth
I have query regarding accessing single & multidimensional array in SQLite3. Example: I have created table with (test [10] INTEGER, name [50] TEXT). How do I pass a value to insert each element of array? How do I read back? (I am using callback function for read back) Please cover answer by