[sqlite] Import CSV in sqlite3?

2005-08-05 Thread scunacc
Dear all, > You can use a system call to execute a command like the following; > > sqlite3 -separator , test.db ".import test.csv sometable" I do something very similar to this from a Perl application for speed. It's about twice as fast as doing this from DBI. (Benchmarked on very large files).

Re: [sqlite] Re: Calling sqlite3RunParser directly to just *parse* SQL code

2005-08-05 Thread scunacc
Dear Will, > It might be nice if there were a sqlite3_check_syntax function in the > API. Another possibility that uses a function in the public API is to > call sqlite3_prepare on the statement(s). Perhaps, but as I was working up to this - dry-running and dbx/gdb'ing the code I wanted to

[sqlite] Calling sqlite3RunParser directly to just *parse* SQL code

2005-08-04 Thread scunacc
Dear all, I have a "meta" application that's a bit like the sqlite shell (except it's not interactive) in which people write statements that are parsed by Perl that contain SQL statements that are passed *unparsed* by Perl to SQLite via DBD::SQLite. Some of the queries are long. To save time,

Re: [sqlite] Segmentation fault on large selects

2005-08-02 Thread scunacc
Dear Kervin, > What does the the 'where' command say? (See the original start of the thread for the whole kaboodle), but here's the offending select: select r.kp, substr(r.kp,1,13) as records, r.result2, r.result4, r.result12, min(1,(r.arecords2/100)) as ap2,

Re: [sqlite] Segmentation fault on large selects

2005-08-02 Thread scunacc
Dear Richard, > Patches to fix ticket #1346 are available at > http://www.sqlite.org/cvstrac/chngview?cn=2573 > Please try adding these patches and see if they do not > fix the problem in the multi-threaded application. Some results. (and bear in mind that I'm not sure that my particular core

Re: [sqlite] Segmentation fault on large selects

2005-08-02 Thread scunacc
Dear Patrick, > Could you download 2.8.16 and let us know if your process works with > that version? If so it may be the same issue and might raise the > visibility. With the performance improvements I'd much rather be on > the latest version. Unfortunately it won't help. The application

Re: [sqlite] Segmentation fault on large selects

2005-08-02 Thread scunacc
Dear Christian, > Doesn't matter how much memory you have. If ulimits restrict how much > memory a process can have, something has to give. Try: The process has unlimited ulimits. Thanks for the suggestion, but other Perl scripts that run already use huge amounts of memory on this machine, so

[sqlite] Segmentation fault on large selects

2005-07-31 Thread scunacc
Dear all, SQLite is wonderful. Thank you for this piece of software. I have a problem however with large tables > 1M rows. I am using the latest of everything: SQLite 3.2.2 DBI 1.48 DBD::SQLite 1.09 AIX 4.3.3 Native C compiler. The Perl is one rev behind at 5.8.6 but I get an identical