Thanks Dan, the upgrade to 3.6.14 sorted out all memory related issues.
"Using the same thread/connection-handle for reading and writing a
Database might improve performance."
Interesting comment, currently a single connection-handle is opened and
shared amongst threads. Each thread has its own
If we use VACUUM command will it reassign a new ROWID to each rows and
write it in the ascending order of ROWID?
If yes then that is what Pramoda.M.A needed.
On 5/15/09, John Machin wrote:
> On 15/05/2009 8:41 PM, Pramoda M. A wrote:
>> But how to get the rows in the same order of insertion?
>>
Roger Binns wrote:
> Yang Zhang wrote:
>> Actually, this is only because Python 3 str is Python 2 unicode. Python
>> 2 (which I'm currently using, and which I believe most of the world is
>> using) str is a physical string of bytes, not a logical/decoded
>> character string. Python 2.6 introdu
I tried both the options.EXTJS lib is for firefox 1.5+.So it wont work.
The snippet is giving an error --
Permission denied to get property XPCComponents.classes
Are you aware of this error?.
Thank you.
- Original Message
From: Neville Franks
To: sqlite-users@sqlite.org
Sent: Monda
SQLite version 3.6.14.1 is now available on the sqlite website:
http://www.sqlite.org/
Version 3.6.14.1 is a branch of version 3.6.14 with patches applied to
fix three bugs. See http://www.sqlite.org/releaselog/3_6_14_1.html
fpr details. The changes are minimal and users who are not bother
> Thank you.
>
> I missed the EXCLUSIVE clause in the docs comes with the newbie
> territory,
> i guess.
>
> So to confirm, would something like this work?
>
> Tables:
> task_log => (id, task_data, time_stamp)
> task_fifo = > (id, fk_task_log)
> task_status_log => (id, fk_task_log, st
> Wrap the above two statements in:
>
> 0) BEGIN EXCLUSIVE
> ...
> 3) COMMIT
>
> The BEGIN EXCLUSIVE above is all you need (and more, a simple BEGIN
> may be enough).
>
> > Can someone with more knowledge of SQLite internals explain the
> > right way to "atomic"-lly "pop"-off an item fro
On May 18, 2009, at 5:32 PM, Allen Fowler wrote:
>>> The simple solution would just create a race condition... i think:
>>>
>>> 1) INSERT INTO status_table FROM SELECT oldest task in queue
>>> 2) DELETE oldest task in queue
>>>
>>> Right?
>>
>> It might work fine if you wrap it in an exclusive
>>
> Have you considered using a more generic message queuing program?
> Wikipedia has a good page about it:
>
> http://en.wikipedia.org/wiki/Message_queue
>
> There is even a standardised protocol - AMQP:
>
> http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
>
> You could jus
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Have you considered using a more generic message queuing program?
Wikipedia has a good page about it:
http://en.wikipedia.org/wiki/Message_queue
There is even a standardised protocol - AMQP:
http://en.wikipedia.org/wiki/Advanced_Message_Queuing_
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Yang Zhang wrote:
> Actually, this is only because Python 3 str is Python 2 unicode. Python
> 2 (which I'm currently using, and which I believe most of the world is
> using) str is a physical string of bytes, not a logical/decoded
> character strin
> >The simple solution would just create a race condition... i think:
> >
> >1) INSERT INTO status_table FROM SELECT oldest task in queue
> >2) DELETE oldest task in queue
> >
> >Right?
>
> It might work fine if you wrap it in an exclusive
> transaction.
>
"exclusive transaction"? Great! H
On May 18, 2009, at 2:53 PM, Pavel Ivanov wrote:
> Actually I wanted to know if it can be useful somewhere. :-)
I already shown you one useful thing to do with a SELECT that omits
the FROM clause: Determine the version of SQLite you are running
using "SELECT sqlite_version()".
In applicat
On Mon, 18 May 2009 12:17:25 -0700 (PDT), Allen Fowler
wrote:
>
>> >I have several CGI and cron scripts and that I would like coordinate via a
>
>> "First In
>> >/ First Out" style buffer.That is, some processes are adding work
>> >units, and some take the oldest and start work on them.
>> >
On Mon, May 18, 2009 at 7:53 PM, Pavel Ivanov wrote:
> Actually I wanted to know if it can be useful somewhere. :-)
You could have a calculator command on your application and let SQLite
parse the result for you ;-)
sqlite> SELECT 1+2*(3+4*5);
47
Regards,
~Nuno Lucas
>
> Pavel
>
> On Mon, May
Igor Tandetnik wrote:
> Yang Zhang wrote:
>> Pavel Ivanov wrote:
>>> BTW, ACID that you mentioned has nothing to do with snapshot
>>> isolation that you want to achieve. AFAIK only Oracle supports this
>>> kind of statement isolation level.
>> Actually, Oracle, Postgresql, SQL Server, Firebird, an
> >I have several CGI and cron scripts and that I would like coordinate via a
> "First In
> >/ First Out" style buffer.That is, some processes are adding work
> >units, and some take the oldest and start work on them.
> >
> >Could SQLite be used for this?
> >
>
> For what it's worth, here
Yang Zhang wrote:
> Pavel Ivanov wrote:
>> BTW, ACID that you mentioned has nothing to do with snapshot
>> isolation that you want to achieve. AFAIK only Oracle supports this
>> kind of statement isolation level.
>
> Actually, Oracle, Postgresql, SQL Server, Firebird, and others support
> snapshot
Actually I wanted to know if it can be useful somewhere. :-)
Pavel
On Mon, May 18, 2009 at 2:52 PM, Noah Hart wrote:
> Just because the syntax allows it, doesn't mean that it will be useful
>
> SELECT '1', sqlite_version() as A where A < 'a' group by 1 order by 1
>
> Noah
>
> -Original Messa
Pavel Ivanov wrote:
> BTW, ACID that you mentioned has nothing to do with snapshot isolation
> that you want to achieve. AFAIK only Oracle supports this kind of
> statement isolation level.
Actually, Oracle, Postgresql, SQL Server, Firebird, and others support
snapshot isolation. http://en.wikip
Just because the syntax allows it, doesn't mean that it will be useful
SELECT '1', sqlite_version() as A where A < 'a' group by 1 order by 1
Noah
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov
Sent: Monday, May
Roger Binns wrote:
> Yang Zhang wrote:
>> I copied and pasted this code straight from my actual application, which
>> uses blobs instead of integers, which I need to convert into strings
>> (since Python interfaces with blobs using the `buffer` type, not `str`).
>
> And for very good reason. Bl
D. Richard Hipp wrote:
> On May 18, 2009, at 1:13 PM, John Elrick wrote:
>
>
>> John Elrick wrote:
>>
>>> SNIP
>>>
>>>
> I say this because your example implies that the Python wrapper
> starts
> the transaction automatically inside the execute, and I would not
>
I didn't notice it earlier and now I'm a bit surprised. Can I ask a
more elaborate example which will include WHERE and/or GROUP BY but
not include FROM?
Pavel
On Mon, May 18, 2009 at 2:32 PM, D. Richard Hipp wrote:
>
> On May 18, 2009, at 2:18 PM, Mitchell L Model wrote:
>
>> Is it really possi
On May 18, 2009, at 2:18 PM, Mitchell L Model wrote:
> Is it really possible to have a SELECT with no FROM? If so, could
> someone provide an example; i
SELECT sqlite_version();
D. Richard Hipp
d...@hwaci.com
___
sqlite-users mailing list
sqlite-
Thanks for all the great responses.
Disabling threads in SQLite (and removing the pthreads lib from the
application build) seemed to fix things. We're still testing but we went
from crashing constantly to not being able to make it fail. Clearly
something's amiss with threads on this platform. We
I may be misreading the select-core diagram on
http://www.sqlite.org/lang_select.html but it appears that the down-arrow that
would allow a query without a FROM clause should not be there. Is it really
possible to have a SELECT with no FROM? If so, could someone provide an
example; if not, wou
On Sun, 17 May 2009 21:34:58 -0700 (PDT), Allen Fowler
wrote:
>
>Hello,
>
>I have several CGI and cron scripts and that I would like coordinate via a
>"First In
>/ First Out" style buffer.That is, some processes are adding work
>units, and some take the oldest and start work on them.
>
>Cou
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Yang Zhang wrote:
> I copied and pasted this code straight from my actual application, which
> uses blobs instead of integers, which I need to convert into strings
> (since Python interfaces with blobs using the `buffer` type, not `str`).
And for ve
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
John Elrick wrote:
> Are you certain the wrapper is behaving that way?
The pysqlite wrapper (available as a sqlite3 Python module) by default
parses your SQL and starts and ends transactions behind your back, in
order to make it look like SQLite com
On May 18, 2009, at 1:13 PM, John Elrick wrote:
> John Elrick wrote:
>> SNIP
>>
I say this because your example implies that the Python wrapper
starts
the transaction automatically inside the execute, and I would not
be
surprised if it did so BEFORE executing the SQL
John Elrick wrote:
> SNIP
>
>>> I say this because your example implies that the Python wrapper starts
>>> the transaction automatically inside the execute, and I would not be
>>> surprised if it did so BEFORE executing the SQL parameter.
>>>
>>>
>> The cursor() method that I call
SNIP
>> I say this because your example implies that the Python wrapper starts
>> the transaction automatically inside the execute, and I would not be
>> surprised if it did so BEFORE executing the SQL parameter.
>>
>
> The cursor() method that I call on the conn for the SELECT should give
SQLite doesn't support several simultaneous transactions on the same
connection to database. So in fact your select and insert statements
execute in the same transaction. And even more: your inserts are not
committed until your select is completely finished. So for your task
you should use differen
Yang Zhang wrote:
> John Elrick wrote:
>> Yang Zhang wrote:
>>> Roger Binns wrote:
>>>
Yang Zhang wrote:
> for i in (str(row[0]) for row in conn.cursor().execute('SELECT key
> FROM shelf ORDER BY ROWID')):
>
You are converting the key which is an integer int
> One thing to watch out for - using SQLITE for a FIFO will have limited
> throughput, because commits will have to be done after inserting or removing
> each entry.
This is fine for now. Wiling to migrate to MySQL, etc if needed for speed.
> This might not be an issue in some situations
John Elrick wrote:
> Yang Zhang wrote:
>> Roger Binns wrote:
>>
>>> Yang Zhang wrote:
>>>
for i in (str(row[0]) for row in conn.cursor().execute('SELECT key FROM
shelf ORDER BY ROWID')):
>>> You are converting the key which is an integer into a string for no
>>> appar
--
From: "Douglas E. Fajardo"
Sent: Monday, May 18, 2009 12:25 PM
To: "General Discussion of SQLite Database" ;
"AllenFowler"
Subject: Re: [sqlite] Sqlite as a FIFO buffer?
> One thing to watch out for - using SQLITE for a FIFO will have limited
Robert,
1. When you build you want to make sure to override the default
directory settings. ./configure --builddir=/usr/
Check the directions and configure script for options
(make sure to run make clean before you attempt to run make again.)
2. Use Checkinstall, it will build a deb file specific
Yang Zhang wrote:
> Roger Binns wrote:
>
>> Yang Zhang wrote:
>>
>>> for i in (str(row[0]) for row in conn.cursor().execute('SELECT key FROM
>>> shelf ORDER BY ROWID')):
>>>
>> You are converting the key which is an integer into a string for no
>> apparent reason.
>>
>
> I copi
One thing to watch out for - using SQLITE for a FIFO will have limited
throughput, because commits will have to be done after inserting or removing
each entry. This might not be an issue in some situations - I have actually
implemented a FIFO to communicate between two tasks where the work-per-e
The way this table works is that when an insert is made, the trigger is
activated. The trigger looks to see if there are more than a set number of
records. If so, the oldest record(s) are deleted by the trigger. This is
accomplished using an auto increment field. This number increases by one
[Typo fix]
Thanks for the help
Though, I am not quite clear on how to get the FIFO aspect of it.
Assuming three tables:
task_log => (id, task_data, time_stamp)
task_fifo = > (id, fk_task_log)
task_status_log => (id, fk_task_log, status_code, time_stamp)
How do I create the correct stored proc
Thanks for the help
Though, I am not quite clear on how to get the FIFO aspect of it.
Assuming three tables:
task_log => (id, code, time_stamp)
task_fifo = > (id, fk_task_log)
task_status_log => (id, fk_task_incoming_log, status_code, time_stamp)
How do I create the correct stored procedures /
On 19/05/2009 1:42 AM, Christopher Taylor wrote:
> I took a slightly different approach and used a trigger. This is the create
> table function from my event log class. The string handler is proprietary
> but other than that there should be enough there to give you an idea.
>
> void DbEventLog::
Roger Binns wrote:
> Yang Zhang wrote:
>> for i in (str(row[0]) for row in conn.cursor().execute('SELECT key FROM
>> shelf ORDER BY ROWID')):
>
> You are converting the key which is an integer into a string for no
> apparent reason.
I copied and pasted this code straight from my actual applicati
As of SQLite 3.6, SQLITE_MUTEX_APPDEF is no longer valid, but it is
still referenced here:
http://www.sqlite.org/c3ref/mutex_alloc.html
Probably want to make that change in the docs, specifically the
section which states:
"If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor macro defi
I took a slightly different approach and used a trigger. This is the create
table function from my event log class. The string handler is proprietary
but other than that there should be enough there to give you an idea.
void DbEventLog::CreateTable(sqlite3* pDatabase)
{
// create the table an
On 5/18/09, Kevin Gale wrote:
> According to the PRAGMA command documentation the database might become
> corrupted if the o/s crashes or the computer loses power before the data has
> been written to the disk surface. From the information we have from the
> customer they continued to use the com
> > I have several CGI and cron scripts and that I would like coordinate via a
> "First In
> > / First Out" style buffer.That is, some processes are adding work
> > units, and some take the oldest and start work on them.
> >
> > Could SQLite be used for this?
> >
> > It would seem very co
Hi Jim.
Thanks for your reply.
Unfortunately, it looks like the database is beyond repair. I can pull some of
the data back via the rowid but it is only the configuration data for the
document and not the user's data.
According to the PRAGMA command documentation the database might become
cor
This is an answer to the post of Dr. Hipp to my question. I tried several
times to send the mail as
"Re: [sqlite] database is locked and is malformed" but it did not work. So
I have to create a new thread.
Hello Dr. Hipp,
thank you for your response. First off all I want to apologize for my
en
You should be able to implement a classic circular buffer in SQL and
make it a VIEW for easy access. ROWIDs can be the buffer pointers and a
second table can store the current values.
Allen Fowler wrote:
> Hello,
>
> I have several CGI and cron scripts and that I would like coordinate via a
>
Thanks Igor, I'll give this a try.
Cheers,
Carl
On Mon, May 18, 2009 at 2:27 PM, Igor Tandetnik wrote:
> "Carl Bretteville"
> wrote in message
> news:24f328900905180515n3ef4bd72h96777a3a37054...@mail.gmail.com
> > I'm trying to find the best and most efficient way to build a
> > "select" query
"Carl Bretteville"
wrote in message
news:24f328900905180515n3ef4bd72h96777a3a37054...@mail.gmail.com
> I'm trying to find the best and most efficient way to build a
> "select" query that uses "in" from C-code where the number of values
> in the list varies from query to query. The sql statement wi
Thanks Knightfeng,
No it didnt work on my 64-Bit System. i wrote a Script in Matlab with the
interface mksqlite, it works perfect on 32-bit system, but on 64-Bit System
Matlab outputs always an Error.
--- 09年5月18日,周一, knightfeng 写道:
发件人: knightfeng
主题: Re: [sqlite] SQLite on 64bit Windows
Hi,
I'm trying to find the best and most efficient way to build a "select" query
that uses "in" from C-code where the number of values in the list varies
from query to query. The sql statement will look something like this:
select * from table1 where name in (name1... nameX)
I've found two ap
"Roger Binns" wrote in
message news:4a1127e1.1040...@rogerbinns.com
> If you also ask for the ROWID you will see that what is happening is a
> new rowid is generated for the replaced row so that if you are
> iterating over the table while modifying it then you effectively have
> an infinite length
Thanks a lot.I was looking exactly for something like this
- Original Message
From: Neville Franks
To: sqlite-users@sqlite.org
Sent: Monday, 18 May, 2009 2:16:52 PM
Subject: Re: [sqlite] Accessing sqlite using javascript
Monday, May 18, 2009, 3:16:45 PM, you wrote:
SP> I had asked t
Hi Quan Shao,
Which one do you want to use? The command-line version or the C/C++ API
? I don't think you need to do any special configuration. The command-line
version is a stand-alone .exe file, which could be started directly and you can
just use MinGW to compile the source code with
Hi all,
does anybody know how i get started with the SQLite suportting the 64-Bit
WindowsXP? do i need to intall something or do some configurations? i've heard
somwhere that we have certain dll's those should be appended into the \sqlite
folder...
thank you for your help!
Wix
Thank you very much Dan, because this is exactly the problem.
I used ldd to check shared library dependencies of the executable file sqlite3
and the result was:
linux-gate.so.1 => (0xb7fc3000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb7f4e000)
libdl.so.2 => /lib/tls/i686/cmov/li
Dear Jean Denis, to answer your question, I did the following:
After installing sqlite3 3.6.14, I executed the search command
sudo find / -name "sqlite3"
to find all possible locations containing the executable file sqlite3. And the
result I get is:
/home/robert/Desktop/sqlite-3.6.14/.libs/sqlit
On May 18, 2009, at 3:33 PM, Robert Villanoa wrote:
> Thank you for your answer, Jean-Denis.
> When I type 'which sqlite3', I get the following location:
> /usr/local/bin/sqlite3
> And the value of my PATH variable is:
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
> games
> Hi,
>
> The latest info I can find about SQLITE_ENABLE_MEMORY_MANAGEMENT is
> from
> mid 2006 - "FAQ said that it might be problematic to use more than one
> thread with SQLITE_ENABLE_MEMORY_MANAGEMENT".
>
> Is this still the case in 3.6.14 ? - The latest FAQ mentions nothing
> about SQLITE_EN
On 5/18/09 10:33 AM, "Robert Villanoa" wrote:
> Thank you for your answer, Jean-Denis.
> When I type 'which sqlite3', I get the following location:
> /usr/local/bin/sqlite3
> And the value of my PATH variable is:
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> So I thi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Yang Zhang wrote:
> for i in (str(row[0]) for row in conn.cursor().execute('SELECT key FROM
> shelf ORDER BY ROWID')):
You are converting the key which is an integer into a string for no
apparent reason.
If you also ask for the ROWID you will see th
Monday, May 18, 2009, 3:16:45 PM, you wrote:
SP> I had asked the same question a few days back,but need a some more help.
SP> I am having my whole SQLite database on client's machine.I want a
SP> way to access that db using javscript.I heard about gears,but the
SP> problem is my target PC has fire
Thank you for your answer, Jean-Denis.
When I type 'which sqlite3', I get the following location:
/usr/local/bin/sqlite3
And the value of my PATH variable is:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
So I think the executable file sqlite3 is seen by PATH.
Could you p
On 5/18/09 9:19 AM, "Robert Villanoa" wrote:
> Hi everyone,
>
> I am new to sqlite3. My OS is Ubuntu 8.04 and it has sqlite3 3.4.2. Now I want
> to upgrade it to the latest version, 3.6.14, but I don't know how to do that.
>
> Here are the steps I have done (after reading another thread about
Hi everyone,
I am new to sqlite3. My OS is Ubuntu 8.04 and it has sqlite3 3.4.2. Now I want
to upgrade it to the latest version, 3.6.14, but I don't know how to do that.
Here are the steps I have done (after reading another thread about this issue):
1. Remove the default version using 'sudo apt
Hi,
The latest info I can find about SQLITE_ENABLE_MEMORY_MANAGEMENT is from
mid 2006 - "FAQ said that it might be problematic to use more than one
thread with SQLITE_ENABLE_MEMORY_MANAGEMENT".
Is this still the case in 3.6.14 ? - The latest FAQ mentions nothing
about SQLITE_ENABLE_MEMORY_MANAGEM
> I will be out of the office starting 2009/05/18 and will not return until
> 2009/06/01.
Ah, thanks, I've been losing sleep wondering about this.
--
Samuel 'Shardz' Baldwin - staticfree.info/~samuel
___
sqlite-users mailing list
sqlite-users@sqlite.o
Hi, for some reason the following program will loop forever:
#!/usr/bin/env python
import sqlite3
conn = sqlite3.connect(':memory:')
conn.text_factory = bytes
conn.execute('CREATE TABLE shelf (key INTEGER NOT NULL, value INTEGER
NOT NULL)')
for i in xrange(3):
conn.execute('INSERT INTO shelf
I will be out of the office starting 2009/05/18 and will not return until
2009/06/01.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
75 matches
Mail list logo