Re: [sqlite] LEFT INNER JOIN a second database

2009-03-17 Thread Derek Developer
>And every reply, even if it is not helpful, is worthy of grateful >thanks because it is being provided free by a list member. This is why i put help in quotes. Please tell me how helpfull comments like: "Rule 1: Assume nothing. Demand proof. " "So produce believable evidence. " "Nobody is going

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
Is the order of WHERE clauses important as C-language is? For instance is SELECT title FROM tracks WHERE title ((title=:last_title AND id>:last_id) AND LIKE %Mad% better than SELECT title FROM tracks WHERE title LIKE %Mad% AND ((title=:last_title AND id>:last_id) ? Anyway, can

Re: [sqlite] Getting SQLITE_BUSY within a transaction and how tohandle it

2009-03-17 Thread Marcus Grimm
You may also try this: http://www.sqlite.org/cvstrac/wiki?p=SampleCode I did use exclusive transactions there but you may change accordingly and try to fit better in your scenario. If that still doesn't do the job you may post the results here again. hope this helps Marcus Dennis Volodomanov

[sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
hi i need help with this one. i have this perl script that goes something like this: my $fetchrow_stmt; sub _fetchrow_stmt { my ($self,%arg) = @_; my $stm = "select * from $arg{table}"; $fetchrow_stmt = $dbh->prepare($stm) || die $dbh->errstr; ; $fetchrow_stmt->execute ||

Re: [sqlite] Index optimization

2009-03-17 Thread Igor Tandetnik
"Andrea Galeazzi" wrote in message news:49bf6196.5070...@korg.it > Is the order of WHERE clauses important as C-language is? No. The optimizer may, and often does, reorder the conditions in the WHERE clause. > For instance is > > SELECT title FROM tracks > WHERE title

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
ay, can the index improve select performance in both previous >> cases? >> > > No. These statements won't actually run, and are thus beyond help. > > Igor Tandetnik > > > > ___ > sqlite-users mailing list >

Re: [sqlite] control buffering of query results

2009-03-17 Thread P Kishor
On Tue, Mar 17, 2009 at 6:44 AM, baxy77bax wrote: > > hi > > i need help with this one. > > i have this perl script that goes something like this: > > my $fetchrow_stmt; > > sub _fetchrow_stmt { > >  my ($self,%arg) = @_; >  my $stm = "select * from $arg{table}"; >  

Re: [sqlite] Index optimization

2009-03-17 Thread Igor Tandetnik
"Andrea Galeazzi" wrote in message news:49bf943a.8050...@korg.it > I meant: > SELECT title FROM tracks > WHERE title >= :last_title AND > (title>:last_title OR id>:last_id) AND title LIKE %Mad% > ORDER BY title,id; > better than > SELECT title FROM tracks > WHERE title LIKE

Re: [sqlite] Index optimization

2009-03-17 Thread D. Richard Hipp
On Mar 17, 2009, at 8:14 AM, Andrea Galeazzi wrote: > I meant: > SELECT title FROM tracks > WHERE title >= :last_title AND > (title>:last_title OR id>:last_id) AND title LIKE %Mad% > ORDER BY title,id; > better than > SELECT title FROM tracks > WHERE title LIKE %Mad% AND > title >=

Re: [sqlite] IP from number with SQL

2009-03-17 Thread Alexey Pechnikov
Hello! On Sunday 15 March 2009 23:10:02 Roger Andersson wrote: > The SQL below might be out there but I didn't find it and since there might > be other that need to get 32-bit integer IP in a sqlite3 database to the > a.b.c.d format using SQL There is extension for ipv4

Re: [sqlite] "Vacuum" command is failing with "SQL Error:Database or disk is full"

2009-03-17 Thread manohar s
Yes, the solution you suggested is working fine. But can't we change this through SQLite? Thanks and Regards, Manohar.S On Wed, Mar 11, 2009 at 12:44 PM, Mihai Limbasan wrote: > manohar s wrote: > > Hi, > > I am trying to execute "PRAGMA page_size=4096; Vacuum;" on a

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Alexey Pechnikov
Hello! On Thursday 12 March 2009 10:09:28 Roger Binns wrote: > > I was asking the group their opinion about the usefulness of such > > feature. > > As described I think it is mostly useless.  Sorting even just for West > European languages is not trivial.  For example some countries have a >

Re: [sqlite] "Vacuum" command is failing with "SQL Error:Database or disk is full"

2009-03-17 Thread manohar s
Also, In linux whether these temporary files are created while vacuuming? If yes, can you tell me where will this be created? manohar On Tue, Mar 17, 2009 at 6:20 PM, manohar s wrote: > Yes, the solution you suggested is working fine. But can't we change this > through

Re: [sqlite] Advices to get max performance with SQLITE and BLOBS

2009-03-17 Thread Alexey Pechnikov
Hello! On Monday 16 March 2009 09:48:50 Pierre Chatelier wrote: > But we are not answering my initial question ! > > Can I expect some gain in > -recompiling SQLite (which options/DEFINEs would help ?) > -using custom memory allocators (I am on Win32, in a multi-threaded   > environment, and yes,

[sqlite] parameters

2009-03-17 Thread meerkat
Hello, I am trying to bind some parameters in a query but I can't do it. I have the following (JavaScript in html page): var rs = db.execute('SELECT distinct '+ 'schedule.schedule_id, ' + 'orders.order_no, '+ 'orders.order_no_iteration, '+ 'organisation.organisation_name, '+

Re: [sqlite] control buffering of query results

2009-03-17 Thread Ken
use the LIMIT clause track and re-run the query when you need the next chunk of data. --- On Tue, 3/17/09, baxy77bax wrote: > From: baxy77bax > Subject: [sqlite] control buffering of query results > To: sqlite-users@sqlite.org > Date: Tuesday, March 17,

Re: [sqlite] parameters

2009-03-17 Thread MikeW
meerkat writes: > > Hello, > > I am trying to bind some parameters in a query but I can't do it. I have the > following (JavaScript in html page): SNIP > > I get an empty result set even though I know that the variables produce a > row (tested in external sql program). > > If

Re: [sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
P Kishor-3 wrote: > > On Tue, Mar 17, 2009 at 6:44 AM, baxy77bax wrote: >> >> hi >> >> i need help with this one. >> >> i have this perl script that goes something like this: >> >> my $fetchrow_stmt; >> >> sub _fetchrow_stmt { >> >>  my ($self,%arg) = @_; >>  my $stm =

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexey Pechnikov wrote: > You can find locale-independant Unicode extension here: > http://ioannis.mpsounds.net/blog/2007/12/19/sqlite-native-unicode-like- > support/ > > This work fine for me and about 4x faster than ICU. That code should be tidied

[sqlite] Speed of DROP INDEX

2009-03-17 Thread Nikolas Stevenson-Molnar
Hi, I'm trying to drop an index on a table with about 8 million rows and it's taking a very long time. I can understand why building the index would take some time, but why dropping it? And is there any way to speed it up? Thanks! _Nik ___

Re: [sqlite] parameters

2009-03-17 Thread Clark Christensen
Difficult to read, so it's unclear what your intention is. But you mention JavaScript, so I'll take a stab... Bound parameters can only contain literal values. You can't use a bound parameter as an identifier for a table or column. Do you really mean this: ... WHERE users.user_id = ?

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I'm know. But you can implement locale-dependent version for single language > only. - From the German example, you can't even do that (name order is different than dictionary order). I think we are agreed that the default SQLite implementation

Re: [sqlite] concat two columns if 2nd non-empty and select first row

2009-03-17 Thread John Machin
On 18/03/2009 8:29 AM, anjela patnaik wrote: > Hello all, > I have a table with multiple columns. I'd like to construct a select > statement that will concat two column values if the second field is non-empty > and also only return one row. > > I noticed the concat operator is not supported. I

[sqlite] httpd server ???

2009-03-17 Thread Ken
This is off topic, but since sqlite list has such savvy folks I thought I'd try here. Does anyone know of an embedded http server that can serve and/or create pages from a sqlite database? Thanks, Ken ___ sqlite-users mailing list

Re: [sqlite] httpd server ???

2009-03-17 Thread Nuno Magalhães
> Does anyone know of an embedded http server that can serve and/or create > pages from a sqlite database? What do you mean embedded? If you mean fast and lightweight, i use nginx. Nuno Magalhães LU#484677 ___ sqlite-users mailing list

Re: [sqlite] httpd server ???

2009-03-17 Thread Tito Ciuro
... or you can try Cherokee: http://www.cherokee-project.com/ -- Tito On 17 mars 2009, at 16:39, Nuno Magalhães wrote: >> Does anyone know of an embedded http server that can serve and/or >> create pages from a sqlite database? > > What do you mean embedded? If you mean fast and lightweight,

Re: [sqlite] httpd server ???

2009-03-17 Thread P Kishor
On Tue, Mar 17, 2009 at 6:30 PM, Ken wrote: > > This is off topic, but since sqlite list has such savvy folks I thought I'd > try here. > > Does anyone know of an embedded http server that can serve and/or create > pages from a sqlite database? > > > Thanks, > Ken

[sqlite] Passing FIELD Object To Function

2009-03-17 Thread TW
I have a function (populate_edit_form) declared in a header as such: /* recmanip.h */ #ifndef RECMANIP_H #define RECMANIP_H #include #include #include #include

Re: [sqlite] httpd server ???

2009-03-17 Thread prad
On Tue, 17 Mar 2009 16:42:04 -0700 Tito Ciuro wrote: > ... or you can try Cherokee: > or even lighttpd may be http://www.lighttpd.net/ -- In friendship, prad ... with you on your journey Towards Freedom http://www.towardsfreedom.com

Re: [sqlite] httpd server ???

2009-03-17 Thread D. Richard Hipp
On Mar 17, 2009, at 7:30 PM, Ken wrote: > > This is off topic, but since sqlite list has such savvy folks I > thought I'd try here. > > Does anyone know of an embedded http server that can serve and/or > create pages from a sqlite database? Such a server is built into the "fossil"

Re: [sqlite] httpd server ???

2009-03-17 Thread Griggs, Donald
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Ken Sent: Tuesday, March 17, 2009 7:31 PM To: sqlite Subject: [sqlite] httpd server ??? === Hi, Ken, Mr. Hipp's Tiny Web

Re: [sqlite] Passing FIELD Object To Function

2009-03-17 Thread John Machin
On 18/03/2009 10:53 AM, TW wrote: [snip] > #include "sqlite.h" [snip] > I'm getting a blank form. I could put all of this in one block, but, > when I want to delete a record, > I don't want to write duplicate code, hence, passing the FIELD, FORM, & > WINDOW objects. The address

Re: [sqlite] Passing FIELD Object To Function

2009-03-17 Thread TW
> Please forgive me if SQLite has a built-in forms package that I haven't > noticed, but the one quoted #include line above doesn't appear to > qualify your question as being "on-topic" for this mailing list > ("General Discussion of SQLite Database "). > > What forms

Re: [sqlite] table metadata

2009-03-17 Thread Dennis Cote
P Kishor wrote: > On Sun, Mar 15, 2009 at 11:56 AM, P Kishor wrote: > >> I am designing a database for carbon modeling. Many of the parameters >> to be stored in the db have very long names... it is kinda >> inconvenient to have column names such as >>

Re: [sqlite] Speed of DROP INDEX

2009-03-17 Thread Jim Wilcoxson
Drop is executed within a transaction, which means that every record you touch has to be backed up to the journal first, then modified in the database. I'm guessing that if you use pragma synchronous=off, it would speed up the drop index, but you'd take a chance on corrupting the database if the

Re: [sqlite] Getting SQLITE_BUSY within a transaction andhow tohandle it

2009-03-17 Thread Dennis Volodomanov
> You may also try this: > > http://www.sqlite.org/cvstrac/wiki?p=SampleCode > > I did use exclusive transactions there but you may change > accordingly and try to fit better in your scenario. > > If that still doesn't do the job you may post the results here again. Thank you, I've picked up

Re: [sqlite] httpd server ???

2009-03-17 Thread dcharno
> The SQLite website is implemented using a profoundly simple HTTP > server that runs off of inetd. The complete source code is contained > in a single file of C code that is available on-line at: > > http://www.sqlite.org/docsrc/artifact/84d487ac34 Just to clarify, this code is part