[sqlite] format for column names

2006-08-29 Thread T
Hi all, I've just joined this mail list. I've read through the syntax page and other sources as to how to create a table using SQLite, and it's all working fine. But I can't find any specifications for the format of a column name. Does the spec permit spaces in the name? It seems to work OK

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread Martin Jenkins
Sripathi Raj wrote: Main question: Using DBD-SQLite, select count(gid) from es_src_media_info takes 130 secs. What gives? Repeatably 0.3 seconds or less here with apsw and python2.4 on Windows XP on a dual Athlon1600 with ~4 year old disks. Same sort of times in the sqlite command line shell.

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread John Stanton
Sripathi Raj wrote: Hi, I have a table with 500,000 records. The following is the schema of that table: CREATE TABLE ES_SRC_MEDIA_INFO (GID INTEGER PRIMARY KEY AUTOINCREMENT, MEDIAPATH VARCHAR(256) NOT NULL UNIQUE, BYTES_USED LONG, BYTES_ON_DISK LONG, MTIME LONG, CTIME LONG, TYPE VARCHAR(20),

Re: [sqlite] Compiling sqlite3 with mingw32

2006-08-29 Thread drh
Matias Torres <[EMAIL PROTECTED]> wrote: > Hello everyone i need help on compiling sqlite3 from source in linux > with mingw. That is exactly how I build the windows libraries and executables that appear on the SQLite website. What you do is this: * Ignore the configure script. * Make a

[sqlite] Compiling sqlite3 with mingw32

2006-08-29 Thread Matias Torres
Hello everyone i need help on compiling sqlite3 from source in linux with mingw. I tried to find the headers to compile my app but i wasn't able to find them, so i'm trying to compile them. I set some enviroment variables : # cross.env PREFIX=/opt/cross-tools TARGET=mingw32 export

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
As you can tell from this forum, locking and synchronization is the area where there is least intuitive understanding among users and is the most consistent source of problems. There must be a deep psychological reason. I don't think it's deep really, just the most complex part to understand.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Jay Sprenkle wrote: On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth propagating

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
If I'm going to do that, it seems easier to just add a .width line to my .sqliterc file that specifies a larger width for about 10 or so columns. Still not perfect though. On 8/29/06, Fred Williams <[EMAIL PROTECTED]> wrote: From experience. Most "free form" output routines I have used

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth propagating universally in the light of the success of Firefox and its

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
On 8/29/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: John Salerno wrote: > So why didn't it expand for Programmer II, but it does expand for AA? AIUI, the default column width is the greater of 10 and the width of the first line of output. Ah, thanks! I had even read about this, but I

RE: [sqlite] Re: two questions about formatting output

2006-08-29 Thread Fred Williams
>From experience. Most "free form" output routines I have used utilizes the content of the first row to establish the width of "columns." (i.e. Reflected in the result per your "Administrative Assistant") If you can "throw away" your first row of output, you could insert a first row in your

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread Martin Jenkins
John Salerno wrote: So why didn't it expand for Programmer II, but it does expand for AA? AIUI, the default column width is the greater of 10 and the width of the first line of output. sqlite> .mo co sqlite> .he on sqlite> create table t(t TEXT UNIQUE); sqlite> insert into t(t)

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
But if you do .mode column (and .header on, if that matters), it outputs: a Secretary Programmer Programmer John On 8/29/06, P Kishor <[EMAIL PROTECTED]> wrote: >"C:\Program Files\sqlite3" tmp.db SQLite version 3.3.7 Enter ".help" for instructions sqlite> create table t

Re: [sqlite] two questions about formatting output

2006-08-29 Thread John Salerno
I'll definitely move on to using Python to work with SQLite, so I guess this won't be a problem eventually, but for now the command line program is a very easy way to test out things and just use a database on the fly, without having to write the extra code involved in connecting to it via a

Re: [sqlite] Re: two questions about formatting output

2006-08-29 Thread P Kishor
"C:\Program Files\sqlite3" tmp.db SQLite version 3.3.7 Enter ".help" for instructions sqlite> create table t (a text); sqlite> .s CREATE TABLE t (a text); sqlite> insert into t values ('Secretary'); sqlite> insert into t values ('Programmer'); sqlite> insert into t values ('Programmer II');

Re: [sqlite] two questions about formatting output

2006-08-29 Thread drh
"John Salerno" <[EMAIL PROTECTED]> wrote: > Just as a follow-up, I noticed that one of my columns *did* expand to > fit a longer name, yet another column didn't. Could it be because the > one that expanded contained a string of a single word, while the > column that didn't expand contained

[sqlite] Re: two questions about formatting output

2006-08-29 Thread John Salerno
Alright, one final note, because now I'm really confused. Here was my original row data: Secretary, Programmer, Programmer II It displayed like this: title -- Secretary Programmer Programmer I changed Secretary to Administrative Assistant and now it shows like this: title --

RE: [sqlite] converting a sqlite table to dbf

2006-08-29 Thread Fred Williams
Damn acronyms anyhow! Thanks. > -Original Message- > From: Jay Sprenkle [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 29, 2006 6:47 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] converting a sqlite table to dbf > > > On 8/29/06, Fred Williams <[EMAIL PROTECTED]> wrote: >

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Martin Jenkins
Ritesh Kapoor wrote: Can you - DRH or someone else provide some more background information on why locking dosen't work on NFS mounted file systems. I just tried to find out what the locking problem was but couldn't find a web page discussing it in any detail. Lots of pages saying there *was*

Re: [sqlite] how to ".import" an Ascii file

2006-08-29 Thread Randall
Sorry for the false info Ascii files have 3 character separation, including 2 chr(34 )(quote)=with space between [" "] ; that is my problem! Best, Randall; thanks for your patience. - To unsubscribe, send email to

Re: [sqlite] converting a sqlite table to dbf

2006-08-29 Thread Noel Frankinet
P Kishor a écrit : Thanks, so the answer is there is no straight-forward way of doing this. I will export to CSV, and then rebuild a dbf using Perl. In case folks wonder why I am going back to the abacus, my data start and end as .dbf. I use SQLite in between to do magic tricks with it. On

RE: [sqlite] how to ".import" an Ascii file

2006-08-29 Thread Griggs, Donald
Hi Randall, Regarding: how to ".import" an Ascii file (separator is " ") Assuming that no translations have occurred in transit, it looks as though you're using a single ascii space as a separator. So, given a file such as: cat dog koala bananna orange kiwi You should be able to import it

Re: [sqlite] converting a sqlite table to dbf

2006-08-29 Thread P Kishor
Thanks, so the answer is there is no straight-forward way of doing this. I will export to CSV, and then rebuild a dbf using Perl. In case folks wonder why I am going back to the abacus, my data start and end as .dbf. I use SQLite in between to do magic tricks with it. On 8/29/06, Fred Williams

Re: [sqlite] how to ".import" an Ascii file

2006-08-29 Thread P Kishor
On 8/29/06, Randall <[EMAIL PROTECTED]> wrote: Hi, I feel embarrased after searching the archives and syntax; Can anyone pleasae spare the time to teach me how to ".import" an Ascii file (separator is " ") I cannot get the separator to work. Many Thanks, Randall I had the toughest time myself

Re: [sqlite] Performance Question

2006-08-29 Thread drh
Kurt Welgehausen <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > Saying NOT NULL on a PRIMARY KEY is redundant, by the way. > > -- > > D. Richard Hipp <[EMAIL PROTECTED]> > > sqlite> insert into t (k, d) values (null, 'jkl'); > sqlite> select * from t; > k d >

[sqlite] how to ".import" an Ascii file

2006-08-29 Thread Randall
Hi, I feel embarrased after searching the archives and syntax; Can anyone pleasae spare the time to teach me how to ".import" an Ascii file (separator is " ") I cannot get the separator to work. Many Thanks, Randall

Re: [sqlite] Performance Question

2006-08-29 Thread Mario Frasca
Mario Frasca wrote: Kurt Welgehausen wrote: [...] should I write a bug ticket about a primary key accepting nulls? there is already a ticket for that: 518. I reopened it three days ago. I have right now attached a patch for it. it is quite small and I hope it fits in the current

Re: [sqlite] converting a sqlite table to dbf

2006-08-29 Thread Jay Sprenkle
On 8/29/06, Fred Williams <[EMAIL PROTECTED]> wrote: Kind'a like chucking your Pentium 5 and going back to scratching on the cave wall with a rock, Eh? I'd export the tables to a CVS files using something like SQLiteAdmin.exe. Open the CVS files with Excel and save the resulting spreadsheets

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread drh
"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > > If you run two instances of firefox you trash > your own database. No, you didn't read what I said. Firefox implements their own locking mechanism, so two instances of firefox will play nicely together. The problem is when some other application,

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, Ritesh Kapoor <[EMAIL PROTECTED]> wrote: Can you - DRH or someone else provide some more background information on why locking dosen't work on NFS mounted file systems. If its a known issue then is there an SQLite compile time option that would remove locking - i couldn't find one.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Jay Sprenkle wrote: > > If it breaks because of something you did, then YOU are the bum. > If it's broken because of the operating system THEY are the bums. > Having someone to blame still doesn't make it work. They are have made the rational

[sqlite] memory footprint and leakage_2

2006-08-29 Thread weiyang wang
hi, i realized i missed some codes in sqlite3GenericRealloc() for the calculating. after modifying my codes, the testing results are: the highest water mark of memory usage is 16684 bytes, and 0 memory leakage. the same configuratiions as described in the early. 16684bytes, is it the right

[sqlite] memory footprint and leakage

2006-08-29 Thread weiyang wang
hi, i am evaluating sqlite performance for mobile platform now. i found something discussable about memory footprint and leakage. the highest water line of memeory usage is 44611bytes (by malloc() ), and there seems a large memory leakage (34017bytes) in my testing scenario. 'cache_size' is

[sqlite] Regarding connect to sqlite via c program

2006-08-29 Thread Tikky
Hi, My motive is to connect sqlite through c program, can u guide me. I am not aware to do the 3rd step , please explain . Win32 recompile with borland c++ builder 1. Download preprocessed source from ¤http://www.sqlite.org/sqlite_source.zip 2. Unzip the source to a project directory, e.g.

Re: [sqlite] Performance Question

2006-08-29 Thread Mario Frasca
Kurt Welgehausen wrote: [EMAIL PROTECTED] wrote: Saying NOT NULL on a PRIMARY KEY is redundant, by the way. [...] Am I missing something, or should I write a bug ticket about a primary key accepting nulls? there is already a ticket for that: 518. I reopened it three days ago.

RE: [sqlite] converting a sqlite table to dbf

2006-08-29 Thread Fred Williams
Kind'a like chucking your Pentium 5 and going back to scratching on the cave wall with a rock, Eh? I'd export the tables to a CVS files using something like SQLiteAdmin.exe. Open the CVS files with Excel and save the resulting spreadsheets as .DBF files (My Excel has a choice of DBASE II