Re: [sqlite] linux ubuntu 3.7.01 installs sqlite3 3.6.22

2010-08-04 Thread Sylvain Pointeau
I just installed the sources (not the amalgamation ones) and it works fine.
what's wrong with the amalgamation package?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] linux ubuntu 3.7.01 installs sqlite3 3.6.22

2010-08-04 Thread Sylvain Pointeau
I don't know if it is important, but I am running ubuntu 10.04 64 bit
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] linux ubuntu 3.7.01 installs sqlite3 3.6.22

2010-08-04 Thread Sylvain Pointeau
I made a small c program for testing the libs...

#include 
#include 


int main()
{
printf("version %s\n",sqlite3_libversion());
return 0;
}


it returns 3.6.22

why do I compile and install a previous version?
(is it linked to ubuntu?)

best regards,
Sylvain





>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] linux ubuntu 3.7.01 installs sqlite3 3.6.22

2010-08-04 Thread Sylvain Pointeau
Hi,

I downloaded, compiled and installed the sqlite3 3.7.01 from the sources
(amalgamation).
however I have the sqlite3 version 3.6.22 installed in /usr/local/bin when I
do "make install"

>.libs/sqlite3 --version
3.6.22

however something strange, it creates a sqlite3 on the folder (same level as
./configure) which has the right version 3.7.01

what should I do then?
it seems that something is not correct, I don't know if it is in the
compilation or in the install script.

Best regards,
Sylvain
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Paweł Hajdan , Jr .
On Wed, Aug 4, 2010 at 16:30, Scott Hess  wrote:

> You should probably pull the current SQLite code and make sure the
> patch even applies, and if not, check to make sure that the problem
> hasn't already been fixed.  ext/fts3 should no longer have the flaw in
> question, as that code was heavily rewritten.


Yeah, the fts3 parts no longer apply and are not included in the patch sent
here. I'm working on the latest (fossil) SQLite codebase.


> The fts1/2 changes would probably be better recast in the mode of the
> fts3 changes.  The relevant comment where things are coming clear was:
>   http://code.google.com/p/chromium/issues/detail?id=15261#c20


Yes, that would be a good direction. However, I'm not yet very familiar with
the SQLite codebase, so I sent something that is in our codebase, doesn't
break tests, and asked for suggestions.

We could then see how SQLite fixed the problem in fts3, and backport that to
Chromium's copy.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] threading error in sqlite 3 in python

2010-08-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/04/2010 11:39 AM, Chris Hare wrote:
> I have 3.6.12 in use.  So how do I get around this error message>  It 
> prevents part of my code from executing

Easy - do no create SQLite objects (connections, cursors) in one thread and
use them in another(1).  There isn't much harm in creating new connections
and cursors as you need them, rather than ruthlessly trying to keep reusing one.

Until SQLite 3.5.9 you had to use SQLite objects in the same thread that
created them - ie this was a SQLite restriction(2).  SQLite 3.5.9 allowed
concurrent thread usage(3) although some tweaks are needed for correct
concurrent error handling (needs SQLite 3.6.5) and care when using the
SQLite API.  Since pysqlite supports older versions of SQLite (probably back
to 3.6.0!) it has the same restrictions and has not been updated to lift
them as that would require a more recent minimum SQLite version in addition
to code changes.

There is a dedicated Python SQLite group where the authors of both Python
SQLite bindings hang out (disclosure: I am one of them):

  http://groups.google.com/group/python-sqlite

My APSW bindings are completely threadsafe taking great care to get all the
threading issues correct (for example error messages require special
handling and you need to be careful with the Python GIL and SQLite database
mutex interactions).

(1) Also be careful to close objects in the same thread.  If you leave them
to close themselves when the destructor runs then it could run in a
different thread.

(2) You could reuse the objects in multiple threads providing you took great
care to not use them concurrently - ie you needed to ensure that you wrapped
everything up in mutexes.  pysqlite does have some flag you can set to tell
it that you are doing this, are absolutely sure your code is correct, and
that it shouldn't check.  It is very rare for code to be absolutely correct,
especially as it is updated over time and the consequences of being wrong
are database corruption and being hard to reproduce.

(3) Strictly speaking there isn't much actual concurrency - each database
connection has a mutex and almost all operations take that mutex so
operations are serialized.  But it does mean you don't need to do anything
in your code to ensure thread safety.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxZ/VcACgkQmOOfHg372QTx6wCfSdzNTgNOrvC9y1Al+8Now17j
7d0An3qjIlA9jJ9x7vbBpeuUu1ioQltr
=7Ged
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Scott Hess
Pawel,

You should probably pull the current SQLite code and make sure the
patch even applies, and if not, check to make sure that the problem
hasn't already been fixed.  ext/fts3 should no longer have the flaw in
question, as that code was heavily rewritten.  Chromium's SQLite was
last synced from SQLite's version last September, and there has
continued to be SQLite development in the meanwhile.

The fts1/2 changes would probably be better recast in the mode of the
fts3 changes.  The relevant comment where things are coming clear was:
   http://code.google.com/p/chromium/issues/detail?id=15261#c20

-scott


On Wed, Aug 4, 2010 at 3:23 PM, Paweł Hajdan, Jr.
 wrote:
> I'm attaching a suggested patch to fix locale-unsafe usage of tolower in FTS
> code. The goal is to make Chromium closer to the upstream, so if you have a
> better solution, that's great.
>
> This is upstreaming a Chromium patch
> http://src.chromium.org/viewvc/chrome/trunk/src/third_party/sqlite/safe-tolower.patch?view=markup
>
> The issue has been reported, see
> http://www.sqlite.org/src/tktview/991789d9f3136a0460dc83a33e815c1aa9757c26
>
> What do you think?
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to update many rows efficiently?

2010-08-04 Thread Igor Tandetnik
Dominique Pellé  wrote:
> For example, given 2 tables t1 and t2, both with 2 columns as follows...
> 
> Table t1:
> 
>ID   name
>--   
>1
>2NULL
>3NULL
>4
>(~1 million records)
> 
> Table t2:
> 
>ID   name
>--   
>2
>4
>(~500,000 records)
> 
> ... I would like to update the 'name' column in records of table t1, so that
> they are the same as the 'name' column in table t2 when the ID columns
> match.

update t1 set name = (select name from t2 where t1.ID=t2.ID)
where ID in (select ID from t2);

Or, if t1.ID is a primary key or otherwise has a unique constraint:

insert or replace into t1(ID, name)
select ID, name from t2;

-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] [PATCH] Fix locale-unsafe usage of tolower (upstreaming Chromium change)

2010-08-04 Thread Paweł Hajdan , Jr .
I'm attaching a suggested patch to fix locale-unsafe usage of tolower in FTS
code. The goal is to make Chromium closer to the upstream, so if you have a
better solution, that's great.

This is upstreaming a Chromium patch
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/sqlite/safe-tolower.patch?view=markup

The issue has been reported, see
http://www.sqlite.org/src/tktview/991789d9f3136a0460dc83a33e815c1aa9757c26

What do you think?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to update many rows efficiently?

2010-08-04 Thread Dominique Pellé
Hi

I'm new to SQLite and I'm still learning.  It's unclear to me how to update
many records efficiently in a table.

For example, given 2 tables t1 and t2, both with 2 columns as follows...

Table t1:

ID   name
--   
1
2NULL
3NULL
4
(~1 million records)

Table t2:

ID   name
--   
2
4
(~500,000 records)

... I would like to update the 'name' column in records of table t1, so that
they are the same as the 'name' column in table t2 when the ID columns
match.

In other words, given the above tables t1, t2, I would like t1 to look like
as follows after update:

Table t1:

ID   name
--   
1
2
3NULL
4
(~1 million records)

What is an efficient way of doing it?
Can this be done in one SQL query?
I'm using C SQLite API.

Thanks
Dominique
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index Help

2010-08-04 Thread Simon Slavin

On 4 Aug 2010, at 6:38pm, Alexander Spence wrote:

> CREATE TABLE [CommentIndex] (
>[CommentKey] TEXT UNIQUE,
>[ThreadPath] TEXT PRIMARY KEY,
>[ParentThreadPath] TEXT,
>[ParentCommentKey] TEXT,
>[NumberOfReplies] INT DEFAULT 0,
>[NumberOfRecommends] INT DEFAULT 0,
>[UserKey] TEXT,
>[Timestamp] INT
> );
> SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' AND UserKey 
> IN ('1','2','3') ORDER BY Timestamp
> SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' AND UserKey 
> IN ('1','2','3') ORDER BY NumberOfRecommends
> SELECT CommentKey FROM CommentIndex WHERE UserKey IN ('1','2','3') ORDER BY 
> Timestamp
> SELECT CommentKey FROM CommentIndex WHERE UserKey IN ('1','2','3') ORDER BY 
> NumberOfRecommends
> SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' ORDER BY 
> Timestamp
> SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' ORDER BY 
> NumberOfRecommends

Instead of "UserKey IN ('1','2','3')" use "UserKey BETWEEN '1' AND '3'"

Then ideal indexes will be

CREATE INDEX PtpUkT ON CommentIndex (ParentThreadPath,UserKey,Timestamp)
CREATE INDEX PtpUkNoR ON CommentIndex 
(ParentThreadPath,UserKey,NumberOfRecommends)
CREATE INDEX UkT ON CommentIndex (UserKey,Timestamp)
CREATE INDEX UkNoR ON CommentIndex (UserKey,NumberOfRecommends)
CREATE INDEX PtpT ON CommentIndex (ParentThreadPath,Timestamp)
CREATE INDEX PtpNoR ON CommentIndex (ParentThreadPath,NumberOfRecommends)


> Should I create one index like this? [ParentThreadPath], [UserKey], 
> [NumberOfRecommends], [Timestamp] ? Or should I create multiple indices 
> targeting the specific queries?

The number of the above you create is a payoff descision.  It might not be 
worth doing all six, perhaps ignore the Timestamp or NumberOfRecommends ones if 
having a smaller database file is important to you.  Fewer indexes mean that it 
takes less time to do an INSERT and, of course, you have more free disk space.

> Also, does it matter if the index is created with ASC and I order by DESC?

If you mean just the last component (e.g. Timestamp) is reversed, then the 
results will be slower.  If you find that it makes a significant difference for 
you you might want to create indexes for the DESCs, for example

CREATE INDEX PtpUkTd ON CommentIndex (ParentThreadPath,UserKey,Timestamp DESC)

But these will again make the databases file larger.  you may find that even 
without them your queries run acceptably quickly.

You might want to read



Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] threading error in sqlite 3 in python

2010-08-04 Thread Jay A. Kreibich
On Wed, Aug 04, 2010 at 01:00:02PM -0500, Chris Hare scratched on the wall:

> How do I figure out what version of sqlite3 is actually installed
> in the python install? (It is python2.6)

  If it isn't too old:

   SELECT sqlite_version();

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] threading error in sqlite 3 in python

2010-08-04 Thread Chris Hare

I think this is a version problem based upon the FAQ, but I get this error when 
a thred timer fires in python and I then try to access my sqlite3 database

ProgrammingError: SQLite objects created in a thread can only be used in that 
same thread.The object was created in thread id 140735088725024 and this is 
thread id 4628287488

How do I figure out what version of sqlite3 is actually installed in the python 
install? (It is python2.6)

Thanks,
Chris

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Index Help

2010-08-04 Thread Alexander Spence
Hey guys,

I am writing a comment index database and need some help optimizing the 
indices.  Here is my table schema and a list of the possible queries.  Please 
note that they could be Ascending or Descending order by's.  This will be used 
in an enterprise level social media app that must be optimized for reads.

Should I create one index like this? [ParentThreadPath], [UserKey], 
[NumberOfRecommends], [Timestamp] ?  Or should I create multiple indices 
targeting the specific queries?  Also, does it matter if the index is created 
with ASC and I order by DESC?

Thanks in advance for your help.


CREATE TABLE [CommentIndex] (
[CommentKey] TEXT UNIQUE,
[ThreadPath] TEXT PRIMARY KEY,
[ParentThreadPath] TEXT,
[ParentCommentKey] TEXT,
[NumberOfReplies] INT DEFAULT 0,
[NumberOfRecommends] INT DEFAULT 0,
[UserKey] TEXT,
[Timestamp] INT
);
SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' AND UserKey 
IN ('1','2','3') ORDER BY Timestamp
SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' AND UserKey 
IN ('1','2','3') ORDER BY NumberOfRecommends
SELECT CommentKey FROM CommentIndex WHERE UserKey IN ('1','2','3') ORDER BY 
Timestamp
SELECT CommentKey FROM CommentIndex WHERE UserKey IN ('1','2','3') ORDER BY 
NumberOfRecommends
SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' ORDER BY 
Timestamp
SELECT CommentKey FROM CommentIndex WHERE ParentThreadPath = 'A1' ORDER BY 
NumberOfRecommends


Please NOTE: This electronic message, including any attachments, may include 
privileged, confidential and/or inside information owned by Demand Media, Inc. 
Any distribution or use of this communication by anyone other than the intended 
recipient(s) is strictly prohibited and may be unlawful. If you are not the 
intended recipient, please notify the sender by replying to this message and 
then delete it from your system. Thank you.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite version 3.7.0.1

2010-08-04 Thread D. Richard Hipp
SQLite version 3.7.0.1 is now available on the SQLite website:

http://www.sqlite.org/
http://www.sqlite.org/download.html

Version 3.7.0.1 is a patch release that fixes a bug in version 3.7.0 that can 
lead to database corruption if the same database file is written alternately by 
version 3.7.0 and version 3.6.23.1 or earlier.  Additional information on this 
problem can be found at:

http://www.sqlite.org/src/info/51ae9cad31

In addition, a typo in the OS/2 driver and a performance regression were fixed. 
 The differences between 3.7.0 and 3.7.0.1 are minimal, but because of the 
possibility of database corruption, upgrading to version 3.7.0.1 is highly 
recommended.

If you encounter any problems, please report them directly to me or to the 
sqlite-users@sqlite.org mailing list.

D. Richard Hipp
d...@sqlite.org



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Please cease sending emails

2010-08-04 Thread Graham Haggar
Thank you.

Graham Haggar
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Re Populating a database from a file

2010-08-04 Thread Simon Davies
On 4 August 2010 14:57, john knops  wrote:
> Thanks for the prompt reply.
> What form should the file take. I've tried enclosing the data for each
> column in double quotes and separating them with either a comma, tab or
> space but I get an error "expected 5 columns but only found 1. Using | I
> get "datatype mismatch"

Difficult to say what is wrong without seeing what you have tried, but
here is an example:

C:\Tmp>copy con tst.txt
1,2,3,4
5,6,7,8
9,10,11,12
13,14,15,16^Z
1 file(s) copied.
C:\Tmp>
C:\Tmp>sqlite3
SQLite version 3.6.11
Enter ".help" for instructions
sqlite> create table tst( a, b, c, d );
sqlite> .import tst.txt tst
tst.txt line 1: expected 4 columns of data but found 1
sqlite> .separator ,
sqlite> .import tst.txt tst
sqlite> select * from tst;
1,2,3,4
5,6,7,8
9,10,11,12
13,14,15,16
sqlite>

Different separators can be used; use .separator to indicate to sqlite
what to use.

> Also when I use .dump does it destroy the table or just copies it t a
> text file?

Creates output only

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Content filtered message notification

2010-08-04 Thread Richard Hipp
I can reproduce your problem.  I still don't know what is causing it, but
I'm sure we will be able to fix it prior to 3.7.0.

We are currently chasing a more serious issue with 3.7.0 seen here:

http://www.sqlite.org/src/info/51ae9cad317a1

We will have a patch release (3.7.0.1) out shortly.  But the patch will not
fix your performance regression.  I recommend you stick with 3.6.23.1 until
we get 3.7.1 out the door later this month.

Thanks for the excellent bug report.

On Wed, Aug 4, 2010 at 7:19 AM,  wrote:

> The attached message matched the sqlite-users mailing list's content
> filtering rules and was prevented from being forwarded on to the list
> membership.  You are receiving the only remaining copy of the
> discarded message.
>
>
>
> -- Forwarded message --
> From: Iain Lane 
> To: Richard Hipp 
> Date: Wed, 4 Aug 2010 12:20:48 +0100
> Subject: Re: Content filtered message notification
> Hello,
>
> On Wed, Aug 04, 2010 at 06:33:57AM -0400, Richard Hipp wrote:
>
>> The problem is possibly caused by this bug:
>> http://www.sqlite.org/src/info/8011086c85
>>
>> Please recompile using -DSQLITE_OMIT_AUTOMATIC_INDEX.  Or recompile using
>> a
>> recent snapshot from http://www.sqlite.org/draft/download.html.  If
>> either
>> of these remediations fix the problem, then bug 8011086c85 is likely the
>> issue.  If you are still seeing the regression after making either of
>> these
>> changes, please let us know so that we can dig deeper.
>>
>> Thanks for the bug report.
>>
>
> I've just tried recompiling with that option, and unfortunately the
> problem is no better.
>
> ,
> | la...@chicken> time sqlite3 ~/.config/banshee-1/banshee.db.copy <
> banshee.sql
> | sqlite3 ~/.config/banshee-1/banshee.db.copy < banshee.sql  106.50s user
> 0.08s system 96% cpu 1:50.63 total
> `
>
> So I checked out the working copy from your SCM, and still no
> improvement there either.
>
> ,
> | la...@chicken> time ./sqlite3 ~/.config/banshee-1/banshee.db.copy <
> ~/temp/banshee.sql | ./sqlite3 ~/.config/banshee-1/banshee.db.copy <
> ~/temp/banshee.sql  48.05s user 0.04s system 85% cpu 56.394 total
> `
>
> I guess there is a real bug here. Thanks for getting back to me.
>
> Iain
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkxZTQwACgkQPy0SnCC/zcfg/ACgkN0eSw2/yl9mio/zCOduUdCe
> GzEAn1TjOp6ndzmjcpMeiXpJUoWNRuB6
> =UGVl
> -END PGP SIGNATURE-
>
>


-- 
-
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Re Populating a database from a file

2010-08-04 Thread john knops
Thanks for the prompt reply.
What form should the file take. I've tried enclosing the data for each 
column in double quotes and separating them with either a comma, tab or 
space but I get an error "expected 5 columns but only found 1. Using | I 
get "datatype mismatch"
Also when I use .dump does it destroy the table or just copies it t a 
text file?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] delete constraint

2010-08-04 Thread Igor Tandetnik
BareFeetWare  wrote:
>>> SELECT RAISE(FAIL,'album has songs cannot be deleted')
>>> WHERE (SELECT count(album_fk) FROM songs WHERE (album_fk = OLD.id) > 0);
>> 
>> Or simply
>> 
>> where old.id in (select album_fk from songs)
> 
> Or most efficiently:
> 
> where exists (select 1 from songs where old.id = album_fk)

I believe the two are equivalent. SQLite essentially rewrites IN to EXISTS - it 
certainly doesn't generate the complete resultset from the nested select and 
then go searching inside that.

I noticed anecdotally that SQLite may optimize complex statements involving IN 
better than those involving EXISTS, but I don't have formal evidence.

> If the columns are indexed, the advantage is negligible, but it's good SQL 
> practice to avoid "count" and "in" when you only care
> if there is any existence of a match.

I'm not sure I understand. What, in your opinion, does IN clause do, if not 
indicate an existence of a match?

> As far as I'm aware, "count" and "in" do a full table scan, whereas "exists" 
> only scans up
> to the first match.

Well, count, obviously, but why would IN do that? What makes you believe that?
-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Command line tool always return the first column in a select

2010-08-04 Thread Benoit Aubuchon
I upgraded to 3.7.0 and it fixes the problem.

Thanks!

Ben

On Wed, Aug 4, 2010 at 8:07 AM, Black, Michael (IS)
wrote:

> I just ran your code on 3.6.23.1 and it works just fine.
>
> Can you try a newer version?
>
> x.sql:
> create table mytable (id VARCHAR(255), name VARCHAR(255), address
> VARCHAR(255), PRIMARY KEY(id));
> insert into mytable (id, name, address) VALUES ('123abc','charlie', '123
> st');
> insert into mytable (id, name, address) VALUES ('yyzz', 'bob',
> '456nowhere');
>
> SQLite version 3.6.23.1
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> .read x.sql
> sqlite> select * from mytable;
> 123abc|charlie|123 st
> yyzz|bob|456nowhere
>
>
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Northrop Grumman Information Systems
>
>
> 
>
> From: sqlite-users-boun...@sqlite.org on behalf of Benoit Aubuchon
> Sent: Tue 8/3/2010 4:55 PM
> To: sqlite-users@sqlite.org
> Subject: EXTERNAL:[sqlite] Command line tool always return the first column
> in a select
>
>
>
> Everytime I select something from a table I always get the first selected
> field only. Here's what I mean:
>
> # sqlite3 mytable.db
> SQLite version 3.6.22
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> *sqlite> .show*
> echo: off
>  explain: off
>  headers: off
> mode: list
> nullvalue: ""
>   output: stdout
> separator: "|"
>width:
> *sqlite> create table mytable (id VARCHAR(255), name VARCHAR(255), address
> VARCHAR(255), PRIMARY KEY(id));*
> *sqlite> insert into mytable (id, name, address) VALUES ('123abc',
> 'charlie', '123 st');*
> *sqlite> insert into mytable (id, name, address) VALUES ('yyzz', 'bob',
> '456
> nowhere');*
> *sqlite> select * from mytable;*
> 123abc
> yyzz
> *sqlite> .head ON*
> *sqlite> select * from mytable;*
> id
> 123abc
> yyzz
> *sqlite> select id, name, address from mytable;*
> id
> 123abc
> yyzz
> *sqlite> select name from mytable;*
> name
> charlie
> bob
> *sqlite> select name, address from mytable;*
> name
> charlie
> bob
> *sqlite> select address, id from mytable;*
> address
> 123 st
> 456 nowhere
> *sqlite> .dump*
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
> VARCHAR(255), PRIMARY KEY(id));
> INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
> INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
> COMMIT;
> *sqlite> select id, name, address from mytable;*
> id
> 123abc
> yyzz
> *sqlite> .mode csv*
> *sqlite> select id, name, address from mytable;*
> id
> 123abc
> yyzz
> *sqlite> .mode line*
> *sqlite> select id, name, address from mytable;*
>   id = 123abc
>
>   id = yyzz
> *sqlite> select * from mytable;*
>   id = 123abc
>
>   id = yyzz
> *sqlite> .dump*
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
> VARCHAR(255), PRIMARY KEY(id));
> INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
> INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
> COMMIT;
>
> # uname -a
> Linux appserver1 2.6.32-gentoo-r1 #1 SMP Wed Jan 13 05:48:57 EST 2010
> x86_64
> Intel(R) Xeon(R) CPU X5550 @ 2.67GHz GenuineIntel GNU/Linux
>
> If I use sqlite from PHP it works as expected. Its only from the command
> line that it doesn't show the other fields.
>
> Has anyone encountered this problem before?
>
> Thanks
>
> Ben
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] warning message when compiling on 64-bit SPARC

2010-08-04 Thread Dr. David Kirkby
I get the following warning from

sqlite3.c:109910:20: warning: cast from pointer to integer of different size

when building on a Sun Blade 1000 with dual 900 MHz UltraSPARC III+ processors.

I'm sorry to say this was with version sqlite-3.6.22, so you may have corrected 
it now.

Since by default all executables are built 32-bit on Solaris, the compiler flag 
-m64 was used to force the use of 64-bit code.

The following variables where

CC=gcc
CCX=g++
CFLAGS= -m64  -g  -O2
CXXFLAGS= -m64  -g  -O2

I don't think the following would be relevant, but it was set too, as sqlite 
was 
built as part of the Sage maths software.

CPPFLAGS= -I /export/home/drkirkby/redstart/64/sage-4.5.2.rc1/local/include

Dave

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General questions from a newbe

2010-08-04 Thread Simon Slavin

On 3 Aug 2010, at 10:20pm, jeff archer wrote:

> Generally, in the past I have always used normalized data but thought I read 
> this might not always be most efficient in SQLite.  Is there any "rule of 
> thumb"?

Generally speaking, don't worry about it.  Do whatever makes your programming 
simplest and easiest.  Worry about efficiency only if the results run too 
slowly or take too much filespace.  It's unlikely that any change you can 
reasonably make will make much difference to your results.

About all the other things you mentioned: I don't see anything that strikes me 
as wrong, but I'm not an expert on every aspect of operation.  The one thing 
you will notice is that, because SQLite does not cache indexing information 
between calls, creating the best index for each SELECT command has a huge 
difference on how fast the SELECT runs.  This is not quite as important for MS 
SQL Server.  So if the speed of your SELECTs matters to you design your indexes 
with care.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Command line tool always return the first column in a select

2010-08-04 Thread Black, Michael (IS)
I just ran your code on 3.6.23.1 and it works just fine.
 
Can you try a newer version?
 
x.sql:
create table mytable (id VARCHAR(255), name VARCHAR(255), address VARCHAR(255), 
PRIMARY KEY(id));
insert into mytable (id, name, address) VALUES ('123abc','charlie', '123 st');
insert into mytable (id, name, address) VALUES ('yyzz', 'bob', '456nowhere');

SQLite version 3.6.23.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .read x.sql
sqlite> select * from mytable;
123abc|charlie|123 st
yyzz|bob|456nowhere
 
 
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Northrop Grumman Information Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Benoit Aubuchon
Sent: Tue 8/3/2010 4:55 PM
To: sqlite-users@sqlite.org
Subject: EXTERNAL:[sqlite] Command line tool always return the first column in 
a select



Everytime I select something from a table I always get the first selected
field only. Here's what I mean:

# sqlite3 mytable.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
*sqlite> .show*
 echo: off
  explain: off
  headers: off
 mode: list
nullvalue: ""
   output: stdout
separator: "|"
width:
*sqlite> create table mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));*
*sqlite> insert into mytable (id, name, address) VALUES ('123abc',
'charlie', '123 st');*
*sqlite> insert into mytable (id, name, address) VALUES ('yyzz', 'bob', '456
nowhere');*
*sqlite> select * from mytable;*
123abc
yyzz
*sqlite> .head ON*
*sqlite> select * from mytable;*
id
123abc
yyzz
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> select name from mytable;*
name
charlie
bob
*sqlite> select name, address from mytable;*
name
charlie
bob
*sqlite> select address, id from mytable;*
address
123 st
456 nowhere
*sqlite> .dump*
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));
INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
COMMIT;
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> .mode csv*
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> .mode line*
*sqlite> select id, name, address from mytable;*
   id = 123abc

   id = yyzz
*sqlite> select * from mytable;*
   id = 123abc

   id = yyzz
*sqlite> .dump*
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));
INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
COMMIT;

# uname -a
Linux appserver1 2.6.32-gentoo-r1 #1 SMP Wed Jan 13 05:48:57 EST 2010 x86_64
Intel(R) Xeon(R) CPU X5550 @ 2.67GHz GenuineIntel GNU/Linux

If I use sqlite from PHP it works as expected. Its only from the command
line that it doesn't show the other fields.

Has anyone encountered this problem before?

Thanks

Ben
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Inserting a large amount of data into a large indexed table

2010-08-04 Thread Black, Michael (IS)
I love email lists like this when people ask questions that make me want to 
test stuff and confirm my hypotheses.  Gives me some much needed practice...
 
Dropping your index and recreating every time you add rows is NOT the best 
thing to do.  Quite obviously your time to create an index is directly related 
to how many rows there are.  So if you add 1000 rows to a 100 row database 
it's going to take a LOT longer to rebuild the index for the entire thing than 
for just 1000 rows.
 
And...as you add more and more sets the time to build the index keeps increase 
linearly (or so) with the total number of rows in you databaseas opposed to 
just taking the time needed for the additional rows would be approximately 
linear with the number of rows being inserted.
 
So for the below compiled with MS 32-bit compiler and 3.6.23.1
Insert 1,000,000 rows with index created before:
18 seconds
Add another 1,000,000 rows
22 seconds
Add another 1,000,000 rows
21 seconds
Add another 1,000,000 rows
23 seconds
Add another 1,000,000 rows
23 seconds
 
 
Insert 1,000,000 rows with index dropped and created after
16 seconds
Add another 1,000,000 rows the same way
20 seconds
Add another 1,000,000 rows the same way
22 seconds
Add another 1,000,000 rows the same way
24 seconds
Note that the first two runs are a bit faster...but then we catch up to just 
keeping the index around and actually take longer on the 4th run.
 
If you run this code with any argument you'll get the "drop/recreate" behavior.
 
#include 
#include 
#include 
#include "sqlite3.h"
void makeindex(sqlite3 *db)
{
 int rc;
 char *errmsg=NULL;
 rc=sqlite3_exec(db, "CREATE index i1 on t(c1)",NULL,NULL,);
 if (rc != SQLITE_OK) {
  puts(errmsg);
  sqlite3_free(errmsg);
 }
 rc=sqlite3_exec(db, "CREATE index i2 on t(c2)",NULL,NULL,);
 if (rc != SQLITE_OK) {
  puts(errmsg);
  sqlite3_free(errmsg);
 }
}
int main(int argc,char *argv[])
{
 sqlite3 *db;
 char *errmsg=NULL;
 int rc;
 int i;
 int indexbefore=0;
 time_t t1=time(NULL);
 if (argc > 1) indexbefore=1;
 puts(sqlite3_libversion());
 sqlite3_open("large.db",);
 rc=sqlite3_exec(db, "PRAGMA cache_size=10",NULL,NULL,);
 rc=sqlite3_exec(db, "PRAGMA synchronous=OFF",NULL,NULL,);
 if (rc != SQLITE_OK) {
  puts(errmsg);
  sqlite3_free(errmsg);
 }
 rc=sqlite3_exec(db, "CREATE TABLE t (c1 integer, c2 integer, c3 integer, c4 
integer, c5 integer, c6 integer)",NULL,NULL,);
 if (rc != SQLITE_OK) {
  puts(errmsg);
  sqlite3_free(errmsg);
 }
 if (indexbefore) {
  makeindex(db);
 }
 else {
  rc=sqlite3_exec(db, "DROP index t1",NULL,NULL,);
  rc=sqlite3_exec(db, "DROP index t2",NULL,NULL,);
 }
 sqlite3_exec(db,"BEGIN",NULL,NULL,);
 for(i=0;i<100;i++) {
  int j=i*10;
  char sql[4096];
  sprintf(sql,"INSERT INTO t VALUES (%d,%d,%d,%d,%d,%d)",i,j);
  rc=sqlite3_exec(db, sql,NULL,NULL,);
  if (rc != SQLITE_OK) {
   puts(errmsg);
   sqlite3_free(errmsg);
   exit(-1);
  }
 }
 if (!indexbefore) {
  makeindex(db);
 }
 sqlite3_exec(db,"COMMIT",NULL,NULL,);
 printf("%d seconds\n",time(NULL)-t1);
 sqlite3_close(db);
 return 0;
}

 
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Northrop Grumman Information Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Paul Sanderson
Sent: Tue 8/3/2010 5:24 PM
To: sqlite-users@sqlite.org
Subject: EXTERNAL:[sqlite] Inserting a large amount of data into a large 
indexed table



Hi

I have a table that contains 6 columns of integers, 2 of these columns
are indexed. There are about 10 Million rows of data in the table.
every now and again I need to add more rows, between about a thousand
and a million at a time. I want the process to be as quiick as
possible (although I know it will take minutes). The process at the
moment is to drop the indexes, add the new rows and then reindex.

Is this the best/fastest way of achieving this - is there a faster way?

P
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Populating a database from a file

2010-08-04 Thread Simon Davies
On 3 August 2010 14:52, john knops  wrote:
> If I'm using MySQL I can populate a database with "Load data infile
> '/tmp/data.txt' into table table_1"
> Is there a similar way of loading data into a sqlite3 database?
>
> Thanks
>

>From sqlite shell use '.import'

http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles

>
>

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Content filtered message notification

2010-08-04 Thread Richard Hipp
The problem is possibly caused by this bug:
http://www.sqlite.org/src/info/8011086c85

Please recompile using -DSQLITE_OMIT_AUTOMATIC_INDEX.  Or recompile using a
recent snapshot from http://www.sqlite.org/draft/download.html.  If either
of these remediations fix the problem, then bug 8011086c85 is likely the
issue.  If you are still seeing the regression after making either of these
changes, please let us know so that we can dig deeper.

Thanks for the bug report.

On Wed, Aug 4, 2010 at 6:25 AM,  wrote:

> The attached message matched the sqlite-users mailing list's content
> filtering rules and was prevented from being forwarded on to the list
> membership.  You are receiving the only remaining copy of the
> discarded message.
>
>
>
> -- Forwarded message --
> From: Iain Lane 
> To: sqlite-users@sqlite.org
> Date: Tue, 3 Aug 2010 20:57:42 +0100
> Subject: Serious performance regression in 3.7.0 vs. 3.6.23.1
> Hello,
>
> There appears to have been a rather large performance regression
> introduced in 3.7.0. This is affecting Banshee[0], a cross-platform
> media player which uses SQLite for its database. It is essentially
> unusable with 3.7.0.
>
> I've uploaded a database and queries[1] which can reproduce this
> problem. Here's the output showing the massive slowdown on the two
> versions.
>
> ,
> | la...@chicken> sqlite3 --version
> | 3.7.0
> | la...@chicken> time sqlite3 ~/.config/banshee-1/banshee.db.copy <
> banshee.sql
> | sqlite3 ~/.config/banshee-1/banshee.db.copy < banshee.sql  46.20s user
> 0.85s system 93% cpu 50.163 total
> `
>
> ,
> | la...@chicken> sqlite3 --version
> | 3.6.23.1
> | la...@chicken> time sqlite3 ~/.config/banshee-1/banshee.db.copy <
> banshee.sql
> | sqlite3 ~/.config/banshee-1/banshee.db.copy < banshee.sql  0.16s user
> 0.03s system 88% cpu 0.215 total
> `
>
> Sorry I can't provide any more in-depth analysis. I'm happy to help
> you guys debug further if you want/need.
>
> Cheers,
> Iain
>
> [0] http://banshee.fm/
> [1] 
> http://people.ubuntu.com/~laney/sqlite/
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkxYdLIACgkQPy0SnCC/zceOoACgjUfXklBQJYQ6JC1MB2mDfcsj
> ANMAnjkItj9B8iCZzA2nyU948crtnE3b
> =MzB1
> -END PGP SIGNATURE-
>
>


-- 
-
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Command line tool always return the first column in a select

2010-08-04 Thread Benoit Aubuchon
Everytime I select something from a table I always get the first selected
field only. Here's what I mean:

# sqlite3 mytable.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
*sqlite> .show*
 echo: off
  explain: off
  headers: off
 mode: list
nullvalue: ""
   output: stdout
separator: "|"
width:
*sqlite> create table mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));*
*sqlite> insert into mytable (id, name, address) VALUES ('123abc',
'charlie', '123 st');*
*sqlite> insert into mytable (id, name, address) VALUES ('yyzz', 'bob', '456
nowhere');*
*sqlite> select * from mytable;*
123abc
yyzz
*sqlite> .head ON*
*sqlite> select * from mytable;*
id
123abc
yyzz
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> select name from mytable;*
name
charlie
bob
*sqlite> select name, address from mytable;*
name
charlie
bob
*sqlite> select address, id from mytable;*
address
123 st
456 nowhere
*sqlite> .dump*
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));
INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
COMMIT;
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> .mode csv*
*sqlite> select id, name, address from mytable;*
id
123abc
yyzz
*sqlite> .mode line*
*sqlite> select id, name, address from mytable;*
   id = 123abc

   id = yyzz
*sqlite> select * from mytable;*
   id = 123abc

   id = yyzz
*sqlite> .dump*
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE mytable (id VARCHAR(255), name VARCHAR(255), address
VARCHAR(255), PRIMARY KEY(id));
INSERT INTO "mytable" VALUES('123abc','charlie','123 st');
INSERT INTO "mytable" VALUES('yyzz','bob','456 nowhere');
COMMIT;

# uname -a
Linux appserver1 2.6.32-gentoo-r1 #1 SMP Wed Jan 13 05:48:57 EST 2010 x86_64
Intel(R) Xeon(R) CPU X5550 @ 2.67GHz GenuineIntel GNU/Linux

If I use sqlite from PHP it works as expected. Its only from the command
line that it doesn't show the other fields.

Has anyone encountered this problem before?

Thanks

Ben
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] General questions from a newbe

2010-08-04 Thread jeff archer
I'm new to SQLite but have some experience with MS SQL Server.  I am looking 
for 
a quick confirmation from expert that my planed use of SQLite is reasonable and 
maybe point out if there are any gotchas.  I've done some prototyping and tried 
most of this out but it is based on how I've done things in the past so maybe 
not best way in SQLite.  My prototypes have only been very small.

I will have two general usage patterns.  1) Few and infrequent single row 
updates.  2) I will start a secondary processes that will scan through a table 
(1000-2 rows) and for each row run an analysis that will take 1 to 90 
seconds and then update another table with the results.

I'm on windows.  I have compiled SQLite into a dll and wrapped it in some C++ 
classes.  SQLite is not exported from the dll.  I plan to use this in both 32 
bit and 64 bit applications to access potentially the same files.  


I will use the following options when I compile SQLite:
SQLITE_THREADSAFE=2
SQLITE_DEFAULT_FILE_FORMAT=4

I have my own compilation of sqlite3.exe that I compile the code of sqlite3.c 
and shell.c into the same application using the same options as above.

I call my dll and exe: sqlutils.dll and sqlutil.exe 

Generally, in the past I have always used normalized data but thought I read 
this might not always be most efficient in SQLite.  Is there any "rule of 
thumb"?

My tables will be relativly small.  Most probably in the 1000-2 rows range.

I will call stored procedure from C++ for any actually changes to the data.

I will use views to make queries simply from c++ code.

Thank you for you time in looking into this,
Jeff
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Repairing a Database.

2010-08-04 Thread Kirk Clemons
Thanks for your reply.
I was afraid that may be the case. This is for my application that uses an
SQLite database to store 3D data so it would be difficult to find out which set 
of binary data is corrupt and which is not.

I do encourage my clients to backup the database, it is even 
stored in the 'My Documents' directory to make it easily accessible.
I also created a batch file executable that uses the 'sqlite3.exe' to perform 
the '.backup' command to create and compress a text version of the database. 
But I guess that's like trying to herd cats into a dog pound. ;)

Regards,
~Kirk.

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Artur Reilin
Sent: Tuesday, August 03, 2010 7:51 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Repairing a Database.

If the database is corrupted, then this is really bad. If you don't have a
backup of your file, then it's almost not really possible to repair the
database. As far as I know...

You could open the database in an editor and try to pick some data, that
was left in the database.

with best wishes

Artur


> Hello All,
> I am new to SQLite and have run into an issue with a malformed database.
> It seems the application using the database was shutdown prematurely
> during an update operation and the journal file was never deleted. This
> means that on startup the application used the wrong journal file and
> corrupted the database. I have seen some information on repairing a
> corrupt database and recovering at least some of the data. But I have not
> had any luck finding out how to do it.
>
> Any help would be greatly appreciated.

> Kirk___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>


Artur Reilin
sqlite.yuedream.de
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Populating a database from a file

2010-08-04 Thread john knops
If I'm using MySQL I can populate a database with "Load data infile 
'/tmp/data.txt' into table table_1"
Is there a similar way of loading data into a sqlite3 database?

Thanks



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Inserting a large amount of data into a large indexed table

2010-08-04 Thread Alexey Pechnikov
Paul, the WAL mode or SSD will be helpful.

-- 
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