-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Saturday, 20 January, 2018 11:12
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>Thanks very much for that explanation Keith. Why ROLLBACK rather than
>END though?
>
>
>
>
Lite mailing list
Subject: Re: [sqlite] [EXTERNAL] get stmt row count
Clemens is correct, the best way is to keep the transaction open (perhaps if
necessary dedicate a connection to this data).
In WAL the open transaction will continue to see the "same data snapshot"
independent of o
lite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Saturday, 20 January, 2018 02:42
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>>Getting both requires TWO queries (and may not be the same from one
>nanosecond to the next).
&g
Thanks Clemens.
From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of
Clemens Ladisch <clem...@ladisch.de>
Sent: Saturday, January 20, 2018 10:39:15 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] [EXTERN
x wrote:
> is there an easy way of checking if the db file has been modified
> since the RowIDs query has been run?
The easiest way is to keep the transaction open, then you know that there
have not been any modifications, as far as you can see. :o)
> I’m sure I read something about a db
e post.
From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of
Keith Medcalf <kmedc...@dessus.com>
Sent: Friday, January 19, 2018 12:12:15 PM
To: SQLite mailing list
Subject: Re: [sqlite] [EXTERNAL] get stmt row count
Then you
On Behalf Of Simon Slavin
>Sent: Friday, 19 January, 2018 11:27
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>
>
>On 19 Jan 2018, at 3:22pm, David Raymond <david.raym...@tomtom.com>
>wrote:
>
>> Keith & Simon, are you not bo
volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Friday, 19 January, 2018 11:10
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>>(and possibly numeric
out anticipated traffic volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Friday, 19 January, 2018 08:50
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>Keith &
te mailing list
Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>(and possibly numeric index)
You’re on my wavelength Ryan as, I think, is David.
Incidentally, the stmt1 query was suited to the harvesting of base table RowIDs
that I’ve been banging on about in other threads. For the q
On 19 Jan 2018, at 3:22pm, David Raymond wrote:
> Keith & Simon, are you not both missing the point? I want the rows and the
> count but without having to run two queries.
Yeah, I didn’t see that. Sorry.
Simon.
___
.@tomtom.com>
Sent: Friday, January 19, 2018 3:22:56 PM
To: SQLite mailing list
Subject: Re: [sqlite] [EXTERNAL] get stmt row count
Maybe use a temp table as another possible solution?
create temp table queryResults (id int);
insert into queryResults select rowid from Tbl where Col > ?1 or
rowids. But it
looks like it's running the CTE twice, which defeats the advantage.
-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of x
Sent: Friday, January 19, 2018 8:50 AM
To: SQLite mailing list
Subject: Re: [sqlite] [EXTERNAL] get st
On 2018/01/19 2:16 PM, Simon Slavin wrote:
On 19 Jan 2018, at 12:06pm, x wrote:
Int Count=0;
while (sqlite3_step(...)) Count++;
That’s a slow way to count rows. Do it in SQL:
SELECT COUNT(*) FROM MyTable WHERE b > 11;
You get just one row back which makes
Keith & Simon, are you not both missing the point? I want the rows and the
count but without having to run two queries.
I tried the following (let stmt1 represent the original query and stmt2 the
count(*) version of that query).
stmt1 took 6+ secs for the first step.
stmt2 took 6+ secs to get
On 19 Jan 2018, at 12:06pm, x wrote:
> Int Count=0;
>
> while (sqlite3_step(...)) Count++;
That’s a slow way to count rows. Do it in SQL:
SELECT COUNT(*) FROM MyTable WHERE b > 11;
You get just one row back which makes everything far faster.
Simon.
nal Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Friday, 19 January, 2018 07:07
>To: SQLite mailing list
>Subject: Re: [sqlite] [EXTERNAL] get stmt row count
>
>Gunter, I just ran a moderately complex query sorted on a n
10:27:30 AM
To: 'SQLite mailing list'
Subject: Re: [sqlite] [EXTERNAL] get stmt row count
No. The only viable query plan is scan and sort (see "explain query plan"
output). The sqlite3_prepare() family of calls creates the SQL program (see
"explain" output) and sets ist initial
No. The only viable query plan is scan and sort (see "explain query plan"
output). The sqlite3_prepare() family of calls creates the SQL program (see
"explain" output) and sets ist initial state. If the value you require is not
null, you must call one of the sqlite3_bind() functions. This sets
19 matches
Mail list logo