Re: [sqlite] WHERE expression with operators from text functions?

2014-10-17 Thread ve3meo
Igor, that is a most oblique and intriguing approach. I will try it out and try to get my head around it in the next day or so. Thanks, Tom Igor Tandetnik-2 wrote > On 10/16/2014 12:03 PM, Tom Holden wrote: >> I need a way to convert the text result to an expression that WHERE >> evaluates as

Re: [sqlite] Search query alternatives.

2014-10-17 Thread Michael Falconer
I am glad I posted the question. Yes James, there is little I can disagree with in your excellent summary. Even the critique of my perhaps poorly framed question is indeed valid. I take your point regarding spec vs implementation, and in my experience across different rdbms's I have frequently

Re: [sqlite] group_concat query performance

2014-10-17 Thread Bert Huijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Kraijenbrink - FixHet - Systeembeheer > Sent: vrijdag 17 oktober 2014 16:46 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] group_concat query

Re: [sqlite] [sqlite-announce] SQLite version 3.8.7

2014-10-17 Thread Richard Hipp
Thanks for the report. The bug you found is probably harmless on most systems. But it is certainly worth fixing. http://www.sqlite.org/src/info/19fe4a0a475bd94 On Fri, Oct 17, 2014 at 5:11 PM, Peter Aronson wrote: > No big deal, but on line 885 of shell.c, did you really

Re: [sqlite] [sqlite-announce] SQLite version 3.8.7

2014-10-17 Thread Peter Aronson
No big deal, but on line 885 of shell.c, did you really mean to test if azArg (of type char**) was greater than 0 rather than not equal to 0? It throws a warning on Solaris 9 with the SUNPro compiler. On Friday, October 17, 2014 10:00 AM, D. Richard Hipp wrote: > > >SQLite

Re: [sqlite] INSERT OR REPLACE in a virtual table implementation....

2014-10-17 Thread dave
... > On 10/18/2014 01:07 AM, dave wrote: > > I have a virtual table implementation, and I would like to > use the INSERT OR > > REPLACE syntax to simplify actions for the user. In my > xUpdate method, for > > the case where insertion is occuring, > > ... > > on a virtual table, or something

Re: [sqlite] INSERT OR REPLACE in a virtual table implementation....

2014-10-17 Thread Dan Kennedy
On 10/18/2014 01:07 AM, dave wrote: I have a virtual table implementation, and I would like to use the INSERT OR REPLACE syntax to simplify actions for the user. In my xUpdate method, for the case where insertion is occuring, else if ( argc > 1 && SQLITE_NULL == sqlite3_value_type ( argv[0] )

[sqlite] Thoughts and expertise help

2014-10-17 Thread jose isaias cabrera
Greetings! I have a program that takes bilingual files and looks for the source strings and reports on the multiples target translations of that source string. For example: Hello, Hola Hello, Hola Hello, Hola! Hello, Dímelo! Hello, Y entoces! Hello, y que! Good Bye, Hasta luego Good Bye,

[sqlite] INSERT OR REPLACE in a virtual table implementation....

2014-10-17 Thread dave
I have a virtual table implementation, and I would like to use the INSERT OR REPLACE syntax to simplify actions for the user. In my xUpdate method, for the case where insertion is occuring, else if ( argc > 1 && SQLITE_NULL == sqlite3_value_type ( argv[0] ) ) { I do check a uniqueness

Re: [sqlite] WHERE expression with operators from text functions?

2014-10-17 Thread Igor Tandetnik
On 10/16/2014 12:03 PM, Tom Holden wrote: I need a way to convert the text result to an expression that WHERE evaluates as an expression. Any possibility to do this within SQLite? with recursive split(str, tail) as ( select null, 'string1+string2+string3' union all select substr(tail, 1,

Re: [sqlite] WHERE expression with operators from text functions?

2014-10-17 Thread Tom Holden
FTS MATCH was a great solution to that particular problem. Thanks again, Dr. Hipp! Back to original question... Is it at all possible to pass the results of a SELECT to a WHERE expression? I have used a SELECT to create a full statement but then I have to copy the result to a query editor and

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Tim Streater
On 17 Oct 2014 at 10:39, Prakash Premkumar wrote: > So the approach where we open the db with ":memory:" keyword does not > provide durability. Why is that any sort of surprise? What you're opening is a database called ":memory:". The string ":memory:" is the name of

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Simon Slavin
On 17 Oct 2014, at 10:39am, Prakash Premkumar wrote: > So the approach where we open the db with ":memory:" keyword does not > provide durability . > Only by increasing the cache size can we make db act as an inmemory db with > durablity. That's the conclusion right ?

Re: [sqlite] Search query alternatives.

2014-10-17 Thread James K. Lowden
On Thu, 16 Oct 2014 09:05:51 +1100 Michael Falconer wrote: > we just wonder if there is a better way to perform this search in > SQL. Is there a general technique which is superior either in speed, > efficiency or load bearing contexts? The simple answer is No,

Re: [sqlite] group_concat query performance

2014-10-17 Thread Kraijenbrink - FixHet - Systeembeheer
Thanks Bert, You are right. Now the C++ example runs equaly fast. Looks like I have to redesign the Db schema. With regards, Peter >Where do you perform the query in the C++ code? > >Your C++ program shows how you prepare the statement 5000 times, but not how >you execute it. > >The VB.Net

Re: [sqlite] Granularity of Locks in sqlite

2014-10-17 Thread Kees Nuyt
On Thu, 16 Oct 2014 18:46:19 +0530, Prakash Premkumar wrote: >Hi, > > From what I understand from reading the followig doc: > http://www.sqlite.org/lockingv3.html > sqlite supports only file level locking. Correct. > Is there any attempts to improve > the granularity

Re: [sqlite] group_concat query performance

2014-10-17 Thread Bert Huijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Kraijenbrink - FixHet - Systeembeheer > Sent: vrijdag 17 oktober 2014 12:01 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] group_concat query

Re: [sqlite] group_concat query performance

2014-10-17 Thread Kraijenbrink - FixHet - Systeembeheer
Joe Mistachkin wrote: > >Thanks for the query. It's difficult to track down performance issues with >System.Data.SQLite without seeing the C# (or VB.NET) example code as there are >a variety of ways to query and process data using it. > >Is there any chance we could see the code that is using

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Prakash Premkumar
Thanks Alessandro. So the approach where we open the db with ":memory:" keyword does not provide durability . Only by increasing the cache size can we make db act as an inmemory db with durablity. That's the conclusion right ? Thanks Prakash On Fri, Oct 17, 2014 at 2:53 PM, Alessandro Marzocchi

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Alessandro Marzocchi
>From memsql site: These features can be tuned all the way from synchronous durability (every write transaction is recorded on disk before the query completes) to purely in-memory durability (maximum sustained throughput on writes). >From sqlite website: The MEMORY journaling mode stores the

Re: [sqlite] strftime() issues

2014-10-17 Thread Clemens Ladisch
Roy Sigurd Karlsbakk wrote: > Trying to use strftime() to extract current Year-Month seems to go nuts. > > sqlite> select strftime('%s', 'now'); > 1413536061 > sqlite> select strftime('%Y-%m', strftime('%s', 'now')); > 3865-46 SQLite interprets a number as a Julian day number. To have it

[sqlite] strftime() issues

2014-10-17 Thread Roy Sigurd Karlsbakk
Hi all Trying to use strftime() to extract current Year-Month seems to go nuts. Any ideas? $ sqlite3 SQLite version 3.6.20 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> select strftime('%s', 'now'); 1413536061 sqlite> -- fine, but sqlite> select

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread J Decker
if it uses disk, it can be persistant. If it's in memory, it's only as reliable as the power to the computer. If it's in memory and cached to disk, it's really a disk database. Just because someone says 'we have a memory database, that's the primary and disk is secondary' it's still a disk

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Prakash Premkumar
Hi, Let's take the case of MemSQL for example. It is an in memory database and it supports durability: Link : http://developers.memsql.com/docs/3.1/faq.html#c3-q1 And Oracle's In memory db TimesTen also provide durability: Link :

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Prakash Premkumar
Is features like WAL (https://www.sqlite.org/wal.html) not available for in memory databases ? Thanks Prakash On Fri, Oct 17, 2014 at 11:23 AM, Alessandro Marzocchi < alessandro.marzoc...@gmail.com> wrote: > Today, random-access memory takes the form of integrated circuits >