Re: [sqlite] Running in memory only

2005-08-31 Thread David Pitcher
Salut Benjamin, Simplest way to make that happen is to use a ram disk, google for 'RamDisk' and the platform you are using. Then you can use the existing sqlite binary/library but all I/O occurs in memory. When you want to persist, you just copy it to a hard disk... D.

Re: [sqlite] Running in memory only

2005-08-31 Thread Ben Clewett
Benjamin, This works well on Linux using file system /dev/shm. This should be installed as default and works indistinguishably from normal file system. SQLite writes about 200 times faster than normal file system. Remember that like all ram disks, this is wiped without warning on

Re: [sqlite] Running in memory only

2005-08-31 Thread benjamin . filippi
Thanks guys I will investigate those features. Benjamin Filippi Capital Fund Management 6 boulevard Haussmann 75009 Paris Tel: +33 1 49 49 59 30 Fax: +33 1 47 70 17 40 [EMAIL PROTECTED] http://www.cfm.fr Ben Clewett <[EMAIL PROTECTED]> 08/31/2005 10:41 AM Please respond to sqlite-users

Re: [sqlite] Running in memory only

2005-08-31 Thread Joel Lucsy
On 8/31/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I would like to know if it is possible to have an instance of sqlite > running in RAM only? My aim is to build a small but fast memory SQL > storage. How about using the database called ":memory:". Unless this has been removed when I

[sqlite] Problems with threadsafe opt correction #2623

2005-08-31 Thread Guillaume Fougnies
Hello, After an upgrade from sqlite 3.2.2 to 3.2.5, i got problems with strange SQLITE_MISUSE returns. After a little investigation, i found it was the --enable-threadsafe option correction in Check-In 2623. It seems SQLite, in os_unix.c sqlite3OsLock with the SQLITE_UNIX_THREADSAFE flag

[sqlite] Simple question

2005-08-31 Thread Massimo Gaspari
Dear all, Is there any way to check if a table (in an opened database) exists? Something smarter than "SELECT * FROM TABLENAME". ? The query should be carried out without any info about the table contents. Regards Max

Re: [sqlite] Simple question

2005-08-31 Thread Sergey Startsev
Hello Massimo, Wednesday, August 31, 2005, 7:19:27 PM, you wrote: MG> Is there any way to check if a table (in an opened database) exists? MG> Something smarter than "SELECT * FROM TABLENAME". ? Select * from sqlite_master where name = 'TABLENAME' -- Best regards Sergey Startsev SQLite

RE: [sqlite] Simple question

2005-08-31 Thread Thomas Briggs
To avoid unintentionally finding indexes with the given name, you should use: select * from sqlite_master where type = 'table' and name = 'TABLENAME' -Tom > -Original Message- > From: Sergey Startsev [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 31, 2005 7:35 AM > To:

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-08-31 Thread D. Richard Hipp
On Wed, 2005-08-31 at 12:53 +0200, Guillaume Fougnies wrote: > My code is sharing a pool of SQLite connections on > multiple databases between a bunch of treatment > threads. > Each thread pops a connection from the pool safely > and push it back once finished. > This works on some systems but

[sqlite] Using indexes to search null and non-null values

2005-08-31 Thread Ron Avriel
Hi, How can I use an index to search for null and non-null values? I have the following table (with one million rows): CREATE TABLE tbl (id string primary key unique, time); CREATE INDEX time_ind on tbl(time); It seems that: select * from tbl where id notnull; does not use an index and takes

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-08-31 Thread Kervin L. Pierre
Hello, Is this the only reason for the... "database handle can only be used on the same thread that opened it" ...rule? Does Windows have that issue? If so, can we convert this to a compile time option? Eg. OS_SUPPORTS_THREADSAFE_FILE_LOCKS or similar flag which can be set to true for OSes

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-08-31 Thread Guillaume Fougnies
> This works on some systems but not on others. On some > versions of Linux, a thread is not able to override locks > created by a different thread in the same process. When > that happens, a database connection created on one thread > will not be usable by a different thread. This is not the

[sqlite] unixepoch seconds issue?

2005-08-31 Thread Clark Christensen
Using Sqlite v3.2.5 on both Linux, and Windows, I'm having some difficulty reconciling unixepoch seconds with other tools. Consider this: select strftime('%s', '2005-08-30 15:19:00'); returns 1125415140 If I take that resulting value and feed it to localtime() in Perl, either under Windows or

Re: [sqlite] unixepoch seconds issue?

2005-08-31 Thread Clark Christensen
Would this be covered by the change in http://www.sqlite.org/cvstrac/tktview?tn=1216 and its related check-in? --- Clark Christensen <[EMAIL PROTECTED]> wrote: > Using Sqlite v3.2.5 on both Linux, and Windows, I'm > having > some difficulty reconciling unixepoch seconds with other > tools.

[sqlite] formating yyyymmdd dates

2005-08-31 Thread DuenosEnLaWEB.com.ar
hi I have this format for dates: mmdd I want this format to be returned from a query: dd/mm/ The only way i have found is doing this... but i do not like it very = much SELECT = strftime('%d/%m/%Y',substr('20050605',1,4)||'-'||substr('20050605',5,2)||= '-'||substr('20050605',7,2)); is

Re: [sqlite] unixepoch seconds issue?

2005-08-31 Thread Lawrence Chitty
Clark Christensen wrote: Using Sqlite v3.2.5 on both Linux, and Windows, I'm having some difficulty reconciling unixepoch seconds with other tools. Consider this: select strftime('%s', '2005-08-30 15:19:00'); returns 1125415140 This is the UTC time (sort of the same as GMT I think). You

Re: [sqlite] unixepoch seconds issue?

2005-08-31 Thread Clark Christensen
Duh! :-)) Thanks! --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > On Wed, 2005-08-31 at 15:46 -0700, Clark Christensen > wrote: > > Using Sqlite v3.2.5 on both Linux, and Windows, I'm > having > > some difficulty reconciling unixepoch seconds with > other > > tools. Consider this: > > > >

Re: [sqlite] formating yyyymmdd dates

2005-08-31 Thread Lawrence Chitty
DuenosEnLaWEB.com.ar wrote: hi I have this format for dates: mmdd I want this format to be returned from a query: dd/mm/ The only way i have found is doing this... but i do not like it very = much SELECT = strftime('%d/%m/%Y',substr('20050605',1,4)||'-'||substr('20050605',5,2)||=

Re: [sqlite] formating yyyymmdd dates

2005-08-31 Thread victor...
you can store you dates like integers using time(). So you can use strftme without any string operation. []'s Victor Lawrence Chitty <[EMAIL PROTECTED]> escreveu: DuenosEnLaWEB.com.ar wrote: >hi > >I have this format for dates: mmdd >I want this format to be returned from a query: