I believe that when NULLs are allowed as PKs, they are all distinct. So, you
can multiple rows with a NULL value as the PK.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Dominique Devienne
Sent: Thursday, December 11,
I am like you, Gwendal, in that I don't like that behavior in SQLite; however,
not liking it doesn't make it a bug.
The constraint-checking algorithm was defined to work exactly the way it's
working. When designed, the fact that your type of insert would fail was known
and understood. Hence,
: Monday, December 08, 2014 9:18 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to
fail
On Mon, Dec 8, 2014 at 8:15 AM, Marc L. Allen mlal...@outsitenetworks.com
wrote:
I am like you, Gwendal, in that I don't like that behavior
Doesn't that code risk being broken in a later version that doesn't update in
the order provided by the sub-query?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of J T
Sent: Monday, December 08, 2014 9:23 AM
To:
I think INSERT OR IGNORE is designed to insert a record into a table if a
record with its primary key doesn't already exist. It's not an INSERT AND
IGNORE ON ANY ERROR.
So:
INSERT OR IGNORE INTO t2 VALUES (1,1)
INSERT OR IGNORE INTO t2 VALUES (1,1)
The above would not cause an error where,
I think attachments are dropped. If the SQL is reasonable size, just post it.
Otherwise, you'll need to host the screen shot somewhere and link to it.
On Nov 19, 2014, at 10:00 PM, Josef Handsuch josef.hands...@gmail.com wrote:
Dear developer, I'd like to thank you for you brilliant
Really? Interesting.
So...
Select 1 Where 1 inf; ?
Or is it just when taking inf by itself?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Richard Hipp
Sent: Monday, May 05, 2014 11:32 AM
To: General Discussion of
I think everyone agrees that SQLite does not strictly follow the SQL standards
for WHERE clause expressions.
The question is... should it? One must ask, what makes SQLite lite? I think
this kind of simplification is of them. However, I can understand that it
might rankle some people.
Not an error. Int/Int uses integer division and results in an integer number.
When one number is a float, the result becomes a float.
I don't know about all SQL varieties, but MSSQL is the same.
On Apr 30, 2014, at 8:04 AM, Gene Connor neothreeei...@hotmail.com wrote:
SELECT DISTINCT
Yep. What most people want is an INSERT OR UPDATE.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Petite Abeille
Sent: Tuesday, September 24, 2013 1:48 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite]
of SQLite Database
Subject: Re: [sqlite] Bug : Tcl interface + INSERT OR REPLACE statement
On Sep 24, 2013, at 7:54 PM, Marc L. Allen mlal...@outsitenetworks.com
wrote:
Yep. What most people want is an INSERT OR UPDATE.
Yep. Which is what one usually calls 'MERGE':
http://en.wikipedia.org/wiki
Discussion of SQLite Database
Subject: Re: [sqlite] Bug : Tcl interface + INSERT OR REPLACE statement
On 24 Sep 2013, at 6:58pm, Petite Abeille petite.abei...@gmail.com wrote:
On Sep 24, 2013, at 7:54 PM, Marc L. Allen mlal...@outsitenetworks.com
wrote:
Yep. What most people want is an INSERT
statement
On 24 Sep 2013, at 7:09pm, Marc L. Allen mlal...@outsitenetworks.com wrote:
Also, there are times when you do a bulk insert, so you have to structure the
query to not fail on records that are already present.
Yeah. Actually I got what I posted wrong. I should have written
Which
Sent: Tuesday, September 24, 2013 2:14 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Bug : Tcl interface + INSERT OR REPLACE statement
On Sep 24, 2013, at 8:09 PM, Marc L. Allen mlal...@outsitenetworks.com wrote:
Not complaining, mind you. MS SQL doesn't have it, and I've long
As I was reading this, I said to myself, what they really need is a confidence
value. Then I read the end and, there it was! A confidence value. Ok.. not
exactly confidence, but I think you get my meaning.
It seems to me that you're allowing the query writer to substitute personal
knowledge
Yes, thanks. I was mistaken.
On Sep 6, 2013, at 9:27 PM, James K. Lowden jklow...@schemamania.org wrote:
On Fri, 6 Sep 2013 07:56:53 -0500
Marc L. Allen mlal...@outsitenetworks.com wrote:
I don't think it's a bug.
It is a bug as long as the behavior is in exception
No one commented on my second thread (written after I actually understood the
problem!).
But, I proposed a two update sequence to do it.
UPDATE table SET Sequence = -(Sequence + 1) WHERE Sequence = seq_to_insert AND
Name = name_to_insert
UPDATE table SET Sequence = -Sequence WHERE Sequence
I don't think it's a bug. I don't believe there's any defined rule for how SQL
should behave, is there? The updates are done serially not atomically. If the
rows happen to be processed in reverse order, then no constraint is violated.
In fact, if there was a way to define the order the
Nice, but that still requires extra work.
1) Determine if row is already in table.
2) Determine next lower value.
3) Split difference and insert.
There's also the possibility that the higher level APP expects the new row to
have a sequence number of 3.
-Original Message-
From:
MySQL also uses this implementation. They acknowledge that it is not SQL
compliant and that (I never thought of this), you cannot delete a record that
has a foreign key link to itself.
Postgres apparently has the ability to have deferred checking as of V9, but not
before then.
Please see:
The left-most of the first select? Or the second? Maybe I don't understand
'left-most?'
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Richard Hipp
Sent: Thursday, September 05, 2013 9:36 AM
To: General Discussion of
How about... ?
UPDATE table SET Sequence = Sequence + 1 WHERE Sequence = seq_to_insert AND
Name = name_to_insert
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Peter Haworth
Sent: Thursday, September 05, 2013 2:21 PM
To:
Oops.. sorry.. I missed the last paragraph.
If you're essentially single threaded.. I can do it in two updates...
UPDATE table SET Sequence = -(Sequence + 1) WHERE Sequence = seq_to_insert AND
Name = name_to_insert
UPDATE table SET Sequence = -Sequence WHERE Sequence 0 AND Name =
Not to mention having to check each new table to see if it's already in the
database and the associated physical reads that might be associated with that.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Jay A. Kreibich
Sent:
Am I understanding that, in this example, the I_NODES_PARENT is being chosen as
the search index because... it's smaller and therefore faster to find initial
qualifying rows that you can then use in some sort of ordered lookup in another
index/table?
I'm always in awe of some of the plans a
Silly question.. I looked at the fix. Why ignore indexes with greater than 4
fields? Isn't that a bit risky? Wouldn't it be better to ignore the fields
after the 4th one for planning?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
Database
Subject: Re: [sqlite] segmentation fault with 3.8.0
On Thu, Aug 29, 2013 at 11:47 AM, Marc L. Allen mlal...@outsitenetworks.com
wrote:
Silly question.. I looked at the fix. Why ignore indexes with greater
than 4 fields? Isn't that a bit risky? Wouldn't it be better to
ignore
Looks like that should return one row, yes? I wonder if operator precedence is
broken for that query and the OR is binding higher than the AND. Also possible
is that the NOT NULL for id in table t is messing up some query optimization
with t2.id NOT NULL.
-Original Message-
From:
, 14 Aug 2013 14:57:19 -0500
Marc L. Allen mlal...@outsitenetworks.com wrote:
I'd actually like a compromise. Allow GROUP BY to accept a derived
name if no base name exists. I realize that's against spec, but
there's no ambiguity (as it otherwise errors out),
It would also mean the query's
As does MS SQL 2008 R2
DROP TABLE #Test
CREATE TABLE #Test ( Val int )
INSERT INTO [#Test] ([Val]) VALUES (-2), (2)
SELECT Val FROM #Test GROUP BY Val
SELECT ABS(Val) AS Val FROM #Test GROUP BY Val
Val
---
-2
2
Val
---
2
2
Your requested test case:
Untitled1 m
- -
1 x
1
I seem to recall having read that as well. I believe, however, that MySQL does
allow it, but I think it defaults to base table when available.
Also, a modified form of the test case:
DROP TABLE #t1
CREATE TABLE #t1(m VARCHAR(4));
INSERT INTO #t1 VALUES('az');
INSERT INTO #t1 VALUES('by');
Heh... I forgot.. both selects below are identical, as 'lower(m1)' is
incorrect. MS SQL does not permit further operations on the derived value.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marc L. Allen
Sent: Wednesday
]
On Behalf Of Richard Hipp
Sent: Wednesday, August 14, 2013 2:26 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] name resolution in GROUP BY
On Wed, Aug 14, 2013 at 2:18 PM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
Heh... I forgot.. both selects below are identical
resolution in GROUP BY
On Wed, Aug 14, 2013 at 2:18 PM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
Heh... I forgot.. both selects below are identical, as 'lower(m1)' is
incorrect. MS SQL does not permit further operations on the derived value.
I think you also missed the name ambiguity
This appears to be how MS SQL handles it... looking at the definitions below,
MS SQL uses the base value in GROUP BY and the derived value in ORDER BY.
That said, 'lower(m)' referenced the base m, not the derived m in the ORDER BY.
I'm afraid I don't understand enough about COLLATE to get
strictly on the derived table.
Peter
From: Marc L. Allen mlal...@outsitenetworks.com
To: General Discussion of SQLite Database sqlite-users@sqlite.org
Sent: Wednesday, August 14, 2013 11:28 AM
Subject: Re: [sqlite] name resolution in GROUP BY
I understand. My previous email had the values of your
I'd actually like a compromise. Allow GROUP BY to accept a derived name if no
base name exists. I realize that's against spec, but there's no ambiguity (as
it otherwise errors out), and does make it much nicer when the derived column
is a hairy expression that I end up needing to replicate
, July 22, 2013 10:51 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] attaching databases programmatically
Marc L. Allen wrote on Monday, July 22, 2013 10:47 AM
Nelson, Erik wrote:
I've got an application that allows the user to create an arbitrary
number of databases
Perhaps I misunderstood the question. It sounds like he has the sqlite*
objects for the databases, but wants to be able to determine the
database/filename associated with them so he can construct an ATTACH statement
in another query.
So.. the question is.. given an sqlite*, can you determine
It's exhaustive in that it absolutely verifies if the key exists or not.
However, it doesn't necessarily do a full database scan. I assume it uses
available indexes and does a standard lookup on the key.
So, it still might be fast enough for what you want (though I missed the
beginning of
Just to throw in my $0.02 as a user
Given the SQL stream of...
misc SQL in transaction
COMMIT
power loss
Vs.
misc SQL in transaction
power loss
unexecuted COMMIT
Except in cases where, in the first example, I have time to inform someone
about the COMMIT before the power loss, there's no
Devienne
Sent: Thursday, May 23, 2013 8:57 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Max of 63 columns for a covering index to work?
On Wed, May 22, 2013 at 9:11 PM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
[...]. It makes me think you might be better off using triggers
No. All SQL functions can safely take NULL as an argument.
LENGTH(NULL) returns NULL, so LENGTH(NULL) = 0 is always false.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Rob Richardson
Sent: Thursday, May 23, 2013 3:34 PM
I think there might be a disconnect.
You can have a covering index on a 300 column table... it just can't cover any
column past the 63rd (or 64th?).
It's not perfect, but not as bad as not being able to have a covering index at
all.
At least, that's how I read some of the answers.
, it was the only way to read from it in a performant
fashion.
-David
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marc L. Allen
Sent: Wednesday, May 22, 2013 12:02 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Max
I haven't had a table that large, but I have had big ones... the disadvantage
is the number of records you can scan in a single disk read, but an advantage
is that you don't have to take the time to join tables, especially when you
need to do it ALL THE TIME.
-Original Message-
From:
In looking at the draft plan... am I right in assuming that at any 'stop' you
can eliminate paths which have consumed the identical set of nodes but are more
expensive?
For instance, at stop 2, the draft shows:
R-N1 (cost: 7.03)
N1-R (cost: 7.31)
R-N2 (cost: 9.08)
N2-R (cost:
of SQLite Database
Subject: Re: [sqlite] Query optimizer bug?
On Tue, Apr 30, 2013 at 5:46 PM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
In looking at the draft plan... am I right in assuming that at any 'stop'
you can eliminate paths which have consumed the identical set of nodes
, April 30, 2013 6:20 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Query optimizer bug?
On Tue, Apr 30, 2013 at 5:46 PM, Marc L. Allen
mlal...@outsitenetworks.comwrote:
In looking at the draft plan... am I right in assuming that at any 'stop'
you can eliminate paths which
It has around 500 context switches per second.. so I'm thinking MosYield.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of markus diersbock
Sent: Thursday, April 18, 2013 1:37 PM
To: General Discussion of SQLite Database
Sorry... replied to the wrong message. :(
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marc L. Allen
Sent: Thursday, April 18, 2013 1:40 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] [SQLite.Net] Right
Yes.. for what it's worth, I've had this very same problem on MS SQL 2008.
Comparing floating point values in their raw form is always dangerous. It just
works so much more often than not that it's easy to forget until you get that
one number that doesn't work.
The solution for MS SQL was
If I have any doubt, I add .5 (or .05, .005, whatever) before the operation. I
know that breaks algebraic rounding, but that's one I live with.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of James K. Lowden
Sent: Friday,
Are you finalizing the UPDATE statement?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of mike.akers
Sent: Monday, February 25, 2013 4:48 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Memory DB - Query does not return all
I haven't done SQLite coding in several months, and it's quite rusty, so I'll
paraphrase. I haven't tested and if this is bogus, I'm sorry in advance. But
maybe it'll give someone the right idea.
You might be better off with a custom function, though.
It would be something like this:
CREATE
--
**
* * *
* Marc L. Allen * ... so many things are *
* * possible just as long as you*
* Outsite Networks, Inc. * don't know they're impossible
of SQLite Database
Subject: Re: [sqlite] SQLite 4
On Tue, Feb 12, 2013 at 11:26 AM, Marc L. Allen mlal...@outsitenetworks.com
wrote:
I'm sorry if this isn't the right group, but an earlier message
mentioned it, and I found some stuff on the SQLite website.
Although I've had a long-standing
Add a group by name, hash and change the select to be name, min(setid), hash?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Paul Sanderson
Sent: Thursday, January 31, 2013 4:48 PM
To: General Discussion of SQLite Database
Actually... with that requirement, I wonder if it's even easier/better to use:
Select name, min(setid), hash
From rtable
Group by name, hash
Having min(setid) 0
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Paul
Might I suggest you include his patch so it at least runs? That way, if he's
willing to test each new version, he doesn't need to modify the official source
to do it.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Richard
If you simply want a list of all files that are present and are not also
present in set 0 (I'm not sure how 'duplicated' means anything different...)
SELECT f.name, f.set, f.hash
FROM files f
LEFT OUTER JOIN files f2 ON f2.name = f.name and f2.set = 0
WHERE f.set != 0 and f2.name is null
If you literally used ORDER BY 1234567892 then there's nothing in the record
being sorted.
I can't recall is SQLite allows order by aliases, but something like..
Select ..., random() as X
Order by X
Might work, as long as random() is executed for each row.
(Sorry.. don't have a quick SQLite
: [sqlite] PERSIST Journal Mode
On 17 Dec 2012, at 8:35pm, Marc L. Allen mlal...@outsitenetworks.com wrote:
Another item.. when having Journal Mode = PERSIST, DBA (in the example below)
was not being physically updated. DBB was.
I can think of a reason you might not be able to see an update
:
On 18 Dec 2012, at 3:04pm, Marc L. Allen mlal...@outsitenetworks.com wrote:
I also have no additional information as to why having PERSIST mode on
prevents the database from being updated/correct. I did check the
sqlite3_close command, and I'm passing it the connection received from
--
**
* * *
* Marc L. Allen * ... so many things are *
* * possible just as long as you*
* Outsite Networks, Inc. * don't know they're impossible. *
* (757) 853-3000 #215
The shared cache does not know that the table is small nor that there is
nothing else to load.
When a thread accesses that shared cache, it must protect itself from the data
page it's on being modified, either because the page is simply flushed from the
cache (if the cache does such things) or
I wonder if it would be possible to refine the cache locking mechanism.
If I understand the modified DB/Table locking semantics when running under a
shared-cache, it appears that the cache page should be protected against
readers and writers.
Perhaps only the list of pages in the cache need to
Discussion of SQLite Database
Subject: Re: [sqlite] Multi-Thread Reads to SQLite Database
On 13 Aug 2012, at 3:11pm, Marc L. Allen mlal...@outsitenetworks.com wrote:
I wonder if it would be possible to refine the cache locking mechanism.
If I understand the modified DB/Table locking semantics when
Try removing the comma before the closing parenthesis? And add a semi-Colin
after the create table command.
On Aug 9, 2012, at 12:04 AM, Brandon Pimenta brandonskypime...@gmail.com
wrote:
I just found a bug in SQLite. It says 1: near ): syntax error. Here's
my SQL query:
CREATE TABLE
I would assume that onoff is either zero or non-zero. Zero turns off the
extended codes, non-zero turns them on.
The code seems to support that, but I didn't delve too deeply.
Marc
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On
I think he wants to know why he is receiving what appears to be an error
notification via the callback.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Adam DeVita
Sent: Thursday, June 28, 2012 9:05 AM
To: General Discussion
How could the schema have changed?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Igor Tandetnik
Sent: Thursday, June 28, 2012 9:38 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Not sure how to interrupt this
Jeff
: Re: [sqlite] Not sure how to interrupt this
Marc L. Allen mlal...@outsitenetworks.com wrote:
How could the schema have changed?
Someone ran CREATE TABLE or VACUUM or similar on the database (possibly via a
different connection).
--
Igor Tandetnik
Too many SQLite3 apps assume a rowid. But I agree that not having a rowid
unless one is defined is the
correct thing to do.
Darn right they do. I'm relatively new to SQLite, but from what I've seen all
across the web, good use of the convenient rowed field is considered a best
practice.
Dr. Hipp responded to an earlier message about this that the session code was
fully operational and was only left out of the official release because he took
so much flak for trying to include it.
I believe that was an answer to a question of why it wasn't rolled into the
main release and
It shouldn't.
It's the same as calling it with NULL, 0, NULL. According to the docs, that
should execute fine, even if an error occurs.
Now, if NULL != 0 on this system, it's different, but I doubt that's the case.
-Original Message-
From: sqlite-users-boun...@sqlite.org
columnNames[i] = malloc(strlen(buffer) + 1);
Need to deal with that pesky '\0'!
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Stephen Wood
Sent: Thursday, May 31, 2012 11:47 AM
To: sqlite-users@sqlite.org
Subject:
True, but an optimizer could only intelligently exclude OUTER JOINS in most
cases.
For instance, if I have a convenience view that combines a series of tables to
provide an overall list of something or another:
View -
SELECT ...
FROM a
INNER JOIN b ON ...
INNER
for
table b exist. This makes optimizations even less likely in complex queries.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marc L. Allen
Sent: Thursday, May 31, 2012 1:11 PM
To: General Discussion of SQLite Database
Negative feedback? For what sounds like an optional component? How come?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Richard Hipp
Sent: Thursday, May 31, 2012 2:48 PM
To: General Discussion of SQLite Database
Subject:
So... you're suggesting the optimizer discard a left outer join when:
1) The left outer join table is joined by a unique column AND
2) No other data from the joined table is used in the query.
Is that about right?
Out of curiosity, why is code being written like the SQL you're providing? Is
unused outer joins?
On Wednesday, May 30, 2012 12:03:02 e.h. Marc L. Allen wrote:
1) The left outer join table is joined by a unique column AND
2) No other data from the joined table is used in the query.
Is that about right?
Almost: add recursively: I actually have it nested with *another join
All requirements are specific :) How do you pick at what point that overhead
is too much?
When the overhead outweighs the benefit.If, for example, you were the only
person who ever needed that particular optimization, I would suggest that the
overhead is too much.
So, the user provides
That page appears to specifically be in regards to compiling SQLite from
sources. It means, don't use the individual files, but use the amalgamation
because it's a lot simpler to deal with.
How you compile it, or in what form the compiled object is used is not
mentioned.
-Original
Funny!
But, very inefficient. Suggest:
#define fsync(x)
Marc
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Simon Slavin
Sent: Thursday, May 17, 2012 11:52 AM
To: j...@kreibi.ch; General Discussion of SQLite Database
Apparently, the update is done a row at a time. Whether a row is deleted
depends on whether the row being updated clashes with a current row when adding
one.
Sometimes it will, sometimes it won't.
1, 2, 3
If the rows are updated (3, 2, 1) it all works.
3 - 4
2 - 3
1 - 2
If the rows are
I don't see the issue with that. Unless you want it to fail anyhow?
You have a unique key. You execute an update that sets all rows to have the
same unique key. Using UPDATE OR REPLACE implies that you want SQLite to do
the right thing, which is end up with a single row.
Do you see the
The last one it saw. It's not deterministic.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Ralf Junker
Sent: Friday, May 04, 2012 5:01 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Details on New
Did you try wrapping all your INSERT statements into a single transaction?
BEGIN TRANSACTION
INSERT...
INSERT...
...
COMMIT
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Nigel Verity
Sent: Wednesday, May 02, 2012 12:05
I suppose using a temporary table is out of the question? But, then again,
that only solves the specific issue. I guess the more general question is how
views with unions interact with aggregates and order by.
What happens if you don't use the view, but perform the query using the actual
What indexes are on the underlying tables?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Peter
Sent: Thursday, April 26, 2012 10:55 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Re Query planner
creating a slow plan
Marc L. Allen wrote, On 26/04/12 15:57:
What indexes are on the underlying tables?
There are indexes on all the fields used in the tables of the
transfer_history view.
While tinkering I have discovered something:
If instead of
SELECT transfer_date FROM
Found this article and thought of this thread.
http://www.drdobbs.com/architecture-and-design/232900836?cid=DDJ_nl_mdev_2012-04-24_helq=d53b813fc9704062bbe2f4d6d6921a9e
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of
Oh, nevermind I see what you're saying.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Thursday, April 19, 2012 3:15 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite]
I was under the impression that, in C, 0 was false, non-zero was true.
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Thursday, April 19, 2012 3:15 PM
To: General Discussion of SQLite Database
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Marc L. Allen [mlal...@outsitenetworks.com]
Sent: Thursday, April 19, 2012 2:56 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] DEFAULT BOOLEAN NOT NULL
Maybe the query analyzer isn't smart enough to do two seeks in this case, so it
does a scan?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Steinar Midtskogen
Sent: Friday, April 13, 2012 3:00 PM
To:
select * from tablename where field1 IS Null
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Fabio Spadaro
Sent: Thursday, March 22, 2012 11:33 AM
To: General Discussion of SQLite Database
Subject: [sqlite] select null
I did show this very example, except lacking the whitespace in front
and differing in capitalization. I assume you feel those distinct
characteristics render your example more interesting than mine.
Or mine, which was sent minutes before Igor's. Hmph. ;)
Suggest he obtain a gmail account and send from there?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Richard Hipp
Sent: Thursday, March 15, 2012 8:18 AM
To: General Discussion of SQLite Database
Subject: [sqlite]
1 - 100 of 148 matches
Mail list logo