We have a similar task and we solve it by using a statement with lots of
parameters
SELECT * FROM table WHERE tableId IN (?, ?, ?, ?, )
The number of ?, let's call it N, is fixed, and set to ~100 -- tuned by
measuring performance.
When the actual number of parameters is less
Combining your transactions would probably help a fair bit.
And I think you're sleeping WAY too long.
Besides upgrading your sqlite use sqlite3_busy_timeout() -- it will handle the
sleeps for you and do it much faster than what you're doing (besides doing it
automaticalliy for you whenever it
I've been having an ongoing issue with some deployed code (Windows).
Occasionally, operations would fail with the SQLITE_FULL error.
I've now tracked this issue down to being caused by other processes (virus
scanners) locking the journal file at sensitive times.
(I'm fairly certain that the
I would like to perform an asynchronous SELECT, terminatable by a semaphore or
equivalent. The problem I'm trying to solve is to allow termination of a
blocking SELECT-operation that take too long.
Does SQLite support that?
Do you maybe want a combination of
http://www.sqlite.org/c3ref/progress_handler.html
And
http://www.sqlite.org/c3ref/interrupt.html
If you really need asynch queries then I think you'll have to thread it or fork
it yourself.
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
Thanks. That's exactly what I need.
Date: Mon, 12 Jul 2010 06:57:13 -0500
From: michael.bla...@ngc.com
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] EXTERNAL: Terminate blocking SELECT-operation?
Do you maybe want a combination of
http://www.sqlite.org/c3ref/progress_handler.html
Is there any reason why you need to bind it?
Can't you just build the SQL string yourself? As long as your IN parameters
are well-controlled I don't think it should be a security risk. Plus you can
check for more then one( after you build the string.
#include stdio.h
#include string.h
int
Hello,
I use sqlite3 for embedded arm system.
I need a command sequence that is able to export data from a single
table to csv format.
I use .output command from sqlite3 shell, and set to column with ; to
separe field at the same line.
But I need to:
1. run that script every 10 minuts.
2.
On 12 Jul 2010, at 1:13pm, Giuseppe Scopelliti wrote:
I need a command sequence that is able to export data from a single
table to csv format.
I use .output command from sqlite3 shell, and set to column with ; to
separe field at the same line.
But I need to:
1. run that script
Hi,
recently I implemented a feature for an gui admin I use internally, but I
think it would be useful also for sqlite shell. Sorry if it already exists
in some form, I could not find similar.
The idea is to use bind syntax together with csv (or clipboard compatible)
import. So if one enters a
On 12 July 2010 12:39, Kristoffer Danielsson
kristoffer.daniels...@live.se wrote:
I would like to perform an asynchronous SELECT, terminatable by a semaphore
or equivalent. The problem I'm trying to solve is to allow termination of a
blocking SELECT-operation that take too long.
Does
Maxim, please show example here and the link to your implementation.
--
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Mon, Jul 12, 2010 at 5:00 PM, Alexey Pechnikov pechni...@mobigroup.ruwrote:
Maxim, please show example here and the link to your implementation.
Alexey,
to illustrate I prepared a screen shot
http://www.maxerist.net/downloads/temp/bind_iterate.png
excel and cells to be copied are at the
Downloaded sqlite to desktop.
ran getting started.
so where is my example ex1.
or How do and where can I save the ex data base and related tables.
thanks,
___
sqlite-users mailing list
sqlite-users@sqlite.org
Michael,
Actually I am building the string myself and it is very controlled, the Id's
are coming from an internal source, but it violates my general rule of never
building query strings. Of course there are always exceptions to the rule
and it looks like this is one of those exceptions.
Thank
I posted this over the weekend, I am assuming it was overlooked
because it was, well, the weekend:) Does anyone have any thoughts?
--
I am on Window 7, opening an existing database with these flags:
SQLITE_OPEN_EXCLUSIVE |
also is there a web site or blog for questions and answers in additional to the
email?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
www.sqlite.org is the web site.
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of B H
Sent: Monday, July 12, 2010 9:48 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] noobie Is there an additional web site for noobie
On 12 Jul 2010, at 2:43pm, B H wrote:
Downloaded sqlite to desktop.
ran getting started.
so where is my example ex1.
or How do and where can I save the ex data base and related tables.
If you did not specify a path for your database file, it is in whatever
directory your operating system
I could not find any information on either the zentus or xerial websites
on any built-in provisions for busy handling.
Did I miss it, or is the functionality there but not documented, or do I
need to check error codes and retry in my code?
TIA,
Gerry
On Mon, Jul 12, 2010 at 09:45:20AM -0400, Sam Carleton scratched on the wall:
Michael,
Actually I am building the string myself and it is very controlled, the Id's
are coming from an internal source, but it violates my general rule of never
building query strings. Of course there are always
On Mon, Jul 12, 2010 at 09:47:24AM -0400, Sam Carleton scratched on the wall:
Then I get a value from one table, begin a transaction, create a temp
customer table, fill it with the current values from the customer
table.?? Here is that SQL run by calling sqlite3_exec():
This all works
Have you looked at the test_intarray code.
http://www.sqlite.org/src/artifact/489edb9068bb926583445cb02589344961054207
On Sun, Jul 11, 2010 at 9:42 PM, Sam Carleton scarle...@miltonstreet.comwrote:
Is there any way to bind to this query?
SELECT * FROM table WHERE tableId IN ( ? );
Where ?
On Mon, Jul 12, 2010 at 10:36 AM, Jay A. Kreibich j...@kreibi.ch wrote:
Are you using sqlite3_exec() for all of these? My first guess is that
you're not finalizing the INSERT statement (or allowing it to run to
completion) before trying to drop the table.
I am using sqlite3_exec() for
On Mon, Jul 12, 2010 at 12:00:40PM -0400, Sam Carleton scratched on the wall:
On Mon, Jul 12, 2010 at 10:36 AM, Jay A. Kreibich j...@kreibi.ch wrote:
Are you using sqlite3_exec() for all of these? My first guess is that
you're not finalizing the INSERT statement (or allowing it to run
Hi,
I have 5 tables. Every second I want to insert 1 row into the main table,
and multiple rows into every other table. What I do right now is to prepare
5 statements for those 5 tables, where the statements for multiple row
insertion is like
INSERT INTO MyTable (FirstCol, SecondCol)
On Mon, 12 Jul 2010 06:47:55 -0700 (PDT), B H
virtualb...@yahoo.com wrote:
also is there a web site or blog for questions and answers in additional to
the email?
Internet Relay Chat:
Channel #sqlite on irc.freenode.net
--
( Kees Nuyt
)
c[_]
1On Mon, 12 Jul 2010 09:29:35 -0700, W.-H. Gu
weihsi...@gmail.com wrote:
Hi,
I have 5 tables. Every second I want to insert 1 row into the main table,
and multiple rows into every other table. What I do right now is to prepare
5 statements for those 5 tables, where the statements for multiple
Hi,
For (1), after I wrapped inserts into a transaction, I face an issue:
the cpu usage is too high. I think the reason is that I use prepare
statement to insert a row at a time, it than does sqlite3_step for thousands
times every second.
Every second I insert 9184 rows, which
Are you serious??? Run fast...more CPU...run slow...less CPU...you're choice.
If you want to run less then 9000 rows/seconds put a sleep in there somewhere.
The only reason you're at 30% and not 100% is due to your disk-speed limitation.
I really can't see what you're complaining about.
On Sat, Jul 10, 2010 at 11:27:41AM -0700, Roger Binns wrote:
On 07/10/2010 07:12 AM, Eric Smith wrote:
Your wrapper is nice -- have you considered folding something like it
into the core (disabled by default, enabled by a compile-time flag) and
submitting it to drh for official adoption?
W.-H. Gu wrote:
For (1), after I wrapped inserts into a transaction, I face an issue:
the cpu usage is too high. I think the reason is that I use prepare
statement to insert a row at a time, it than does sqlite3_step for
thousands times every second.
If I'm reading this right, you're
On Mon, Jul 12, 2010 at 01:59:30PM -0500, Nicolas Williams wrote:
The result is that you end up with a tiny penalty for fork
detection: two loads, a compare and a likely-not-taken branch.
Actually three loads, two compares and two likely-not-taken branch,
unless you know you always
Roger Binns wrote:
I'd have no problem contributing the code to SQLite, but there isn't
very much of it
I don't think the devs would complain about that. This code has too
few lines!
and it is an open issue as to how you report the cross fork usage should
it happen. (In my case I know
On Fri, Jul 9, 2010 at 3:21 PM, Matthew L. Creech mlcre...@gmail.comwrote:
In testing the latest SQLite snapshot with WAL enabled, it seems that
there's no way to use a database in a read-only location.
The release of SQLite version 3.7.0 will likely be delayed while we try to
figure out how
Richard,
In thinking about this, consider that if you embed the WAL within the SQLite
database itself, past the high-water mark, it would also take case of this
problem.
Noah Hart
On Fri, Jul 9, 2010 at 3:21 PM, Matthew L. Creech mlcre...@gmail.comwrote:
In testing the latest SQLite
I must be missing something...why does a read-only database require WAL at all?
If you can't update tables then how can you use WAL?
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
From: sqlite-users-boun...@sqlite.org on behalf of Noah
On 12 Jul 2010, at 8:42pm, Noah Hart wrote:
consider that if you embed the WAL within the SQLite
database itself, past the high-water mark, it would also take case of this
problem.
No. Because whichever file stores the WAL information is stored in has to be
opened with read/write
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07/12/2010 12:07 PM, Eric Smith wrote:
I don't think the devs would complain about that. This code has too
few lines!
They also have to have signed paper copies dedicating the code to public
domain and acknowledging the right to do so. That is
On Mon, Jul 12, 2010 at 02:47:19PM -0700, Roger Binns wrote:
About the only correct thing to do in a process using SQLite through a fork
is to terminate the process.
You can return an error to the caller too. Of course, if you're using
the mutex functions to do this then it's too late, so you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07/12/2010 02:59 PM, Nicolas Williams wrote:
You can return an error to the caller too.
That would require substantial surgery to SQLite. Almost every routine
acquires and releases locks so they would have to be changed along with
SQLite mutex
On Mon, Jul 12, 2010 at 08:43:32PM -0700, Roger Binns wrote:
Earlier you were trying to optimise out calls to getpid() and now you want
every SQLite function source to be changed?
No, just entry points into the library. What makes you think that I
meant that every function in the library
On Mon, Jul 12, 2010 at 08:43:32PM -0700, Roger Binns wrote:
They're insane (the _first_, not last, fildes close(2) in a process
drops all locks on the underlying file), but the child won't clobber the
parent's locks.
That is assuming all components (C libraries, threading, compatibility
Black, Michael (IS) wrote:
Combining your transactions would probably help a fair bit.
And I think you're sleeping WAY too long.
thanks.
Besides upgrading your sqlite use sqlite3_busy_timeout() -- it will
handle the sleeps for you and do it much faster than what you're doing
(besides doing
Hi,
Lets assume that we have a very simple without any indexing or constraints. Now
we have inserted some data to the table. When we do a simple select query, is
it guranteed that the rows will be retrieved in the same order as they are
inserted?
Thanks a lot,
Lloyd
Hello
L Lets assume that we have a very simple without any indexing or
Lconstraints. Now we have inserted some data to the table. When we do a
Lsimple select query, is it guranteed that the rows will be retrieved
Lin the same order as they are inserted?
No. It may look like they are being
Thanks Swithun. I dont have any supportive column in table to issue order
by. Can it be achieved by issuing an ordr by query on row_id (used by
sqlite internaly)?
Thanks,
Lloyd
Hello
L Lets assume that we have a very simple without any indexing or
Lconstraints. Now we have inserted some
47 matches
Mail list logo