Re: [sqlite] 64-column covering index limit clarification

2018-10-18 Thread Shawn Wagner
Okay, next question: Does the query you're testing this with obey the requirements needed to use the partial index (see https://sqlite.org/partialindex.html#queries_using_partial_indexes)? On Thu, Oct 18, 2018 at 9:43 PM Deon Brewis wrote: > Yes a non partial index beyond column 64 works as I

Re: [sqlite] Why operations with in-memory DB are much faster than with on-disk DB?

2018-10-18 Thread Simon Slavin
On 19 Oct 2018, at 5:55am, Yuri wrote: > I noticed that my DB import process is much slower when run on the DB on > disk, vs. in memory. It reads files and runs a massive amount of > inserts/updates. Memory access is much faster than disk access. If you're using actual spinning hard disks,

[sqlite] Why operations with in-memory DB are much faster than with on-disk DB?

2018-10-18 Thread Yuri
I noticed that my DB import process is much slower when run on the DB on disk, vs. in memory. It reads files and runs a massive amount of inserts/updates. Why is this? Is there any way to speed it with disk without using in-memory DB? Yuri ___

Re: [sqlite] 64-column covering index limit clarification

2018-10-18 Thread Deon Brewis
Yes a non partial index beyond column 64 works as I would expect. - Deon > On Oct 18, 2018, at 12:34 PM, Shawn Wagner wrote: > > Does a normal non-partial index make a difference in the query plan? > >> On Thu, Oct 18, 2018, 12:30 PM Deon Brewis wrote: >> >> Hi, >> >> I seem to have run

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Scott Doctor
Why not just add the amalgmation to your source then do C function calss. I do not get why you would use a dll when you can just link in the amalgamtion into your program and have full access to the latest version. - Scott Doctor sc...@scottdoctor.com

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Simon Slavin
On 19 Oct 2018, at 2:23am, Larry Brasfield wrote: > Jordy Deweer asks about alternatives to System.Data.SQLite because: “I run > into errors a lot, using the System.Data.SQLite libraries. It easily crashes, > trhows exceptions and similar issues...”. System.Data.SQLite is generally considered

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Larry Brasfield
Jordy Deweer asks about alternatives to System.Data.SQLite because: “I run into errors a lot, using the System.Data.SQLite libraries. It easily crashes, trhows exceptions and similar issues...”. I’ve used that module for several projects and found it to be generally robust. I have also seen

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Jens Alfke
> On Oct 18, 2018, at 11:50 AM, Maziar Parsijani > wrote: > > It will crash or exit the program. You’re not handling errors correctly, then. I think you said you’re using Python? Then the query will probably throw a Python exception; you need to catch that and handle it appropriately.

Re: [sqlite] How to round to an Integer

2018-10-18 Thread Keith Medcalf
On Thursday, 18 October, 2018 14:13, Richard Hipp wrote: >On 10/18/18, John Harney wrote: >> Recently figured this out. Seems to work fine >> trim(trim(round(1.111,0),'0'),'.') = 1 >CAST(1.111 AS integer) That should be CAST(round(x,0) as integer) if you want the rounded result as an

Re: [sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread David Raymond
You have to look at the original dates. The date you're giving it for the first one is Feb 29th on a leap year. So 31 years from Feb 29th goes to Feb 29th on a NON-leap year, and thus gets rolled over to March 1st. For the second one you're saying 31 years from March 1st, which also lands on

Re: [sqlite] Hot-Journal with VFS

2018-10-18 Thread Simon Slavin
On 18 Oct 2018, at 3:27pm, Bob schwanzer wrote: > DB is > opened by 10-20 processes each of which can have multiple threads. What OS are you using ? What programming language are you using ? Are you calling the SQLite C library directly or using a shim ? Does your program close each database

Re: [sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread Simon Slavin
On 18 Oct 2018, at 2:28pm, Fábio Pfeifer wrote: > When working with Apple iOS databases, I found something strange when dealing > with dates. I suspect you are you are referring to a library routine which is used by lots of iOS software, but can you give us a specific App which exhibits this

Re: [sqlite] How to round to an Integer

2018-10-18 Thread Richard Hipp
On 10/18/18, John Harney wrote: > Recently figured this out. Seems to work fine > > trim(trim(round(1.111,0),'0'),'.') = 1 > CAST(1.111 AS integer) -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Rob Richardson
What target platforms have you found on which it is unreliable? I haven't had problems on Win7, but I haven't used it all that much. RobR On Thu, Oct 18, 2018 at 2:57 PM Jordy Deweer wrote: > Larry Brasfield wrote: "Jordy Deweer asks: “Is there a way to use a > SQLite database in a C#

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Rob Richardson
Why don't you want to use System.Data.SQLite? On Thu, Oct 18, 2018 at 11:04 AM Jordy Deweer wrote: > Dear all > > I am new to this group and this is my first question here. > > My question is as follows: > > Is there a way to use a SQLite database in a C# project, without > installing /

[sqlite] How to round to an Integer

2018-10-18 Thread John Harney
Recently figured this out. Seems to work fine trim(trim(round(1.111,0),'0'),'.') = 1 Aviso de Privacidad y Confidencialidad // Privacy and Confidentiality Notice // Avis de confidentialit?: https://privacy.grupobimbo.com/

[sqlite] Hot-Journal with VFS

2018-10-18 Thread Bob schwanzer
Hi, I'm seeing hot journal frequently in our SQLite installation. We use VFS which does some checksum and other operations. There are no abnormal scenarios such as power off, process crash, abandoned transactions... DB is opened by 10-20 processes each of which can have multiple threads. Old

[sqlite] Bug report: bug in datetime conversion function

2018-10-18 Thread Fábio Pfeifer
Hello, When working with Apple iOS databases, I found something strange when dealing with dates. Apple iOS databases store dates as seconds from 2001-01-01 (31 years after unix epoch). But from 2015-03-02 to 2016-02-29 there is a offset of one day if '31 years' modifier is used. To reproduce,

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Peter da Silva
Don't put raw user input where code is expected. Match strongs are code. You need to encapsulate (eg escape) or filter (delete bad characters) match strings outside sqlite. On Thu., 18 Oct. 2018, 13:50 Maziar Parsijani, wrote: > It will crash or exit the program. > > On Thu, Oct 18, 2018 at

Re: [sqlite] 64-column covering index limit clarification

2018-10-18 Thread Shawn Wagner
Does a normal non-partial index make a difference in the query plan? On Thu, Oct 18, 2018, 12:30 PM Deon Brewis wrote: > Hi, > > I seem to have run into a limit where SQLITE doesn't use an index > correctly if an indexed column is over the 64th column in the table. It's a > partial index like:

[sqlite] 64-column covering index limit clarification

2018-10-18 Thread Deon Brewis
Hi, I seem to have run into a limit where SQLITE doesn't use an index correctly if an indexed column is over the 64th column in the table. It's a partial index like: CREATE INDEX idx ON table(A, B DESC, C, D) WHERE A > 0 Where A and B are columns 70 and 72 on 'table'. I know about the

Re: [sqlite] Strip leading "The" in alphabetical TOC?

2018-10-18 Thread Simon Slavin
On 18 Oct 2018, at 7:17pm, Charles Leifer wrote: > In the documentation alphabetical listing, it threw me off when I was lookup > up the JSON1 docs and didn't find them under "J", due to the title being "The > JSON1 Extension". Some years ago I wrote a TITLE Collating Sequence for SQLite. I

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Jordy Deweer
Larry Brasfield wrote: "Jordy Deweer asks: “Is there a way to use a SQLite database in a C# project, without installing / configuring / depending on the System.Data.SQLite libraries? I really hope there is.” If you do a web search for the combination of terms “SQLite”, “C#” and “library”, you

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
It will crash or exit the program. On Thu, Oct 18, 2018 at 2:27 PM Jens Alfke wrote: > > > > On Oct 18, 2018, at 11:17 AM, Maziar Parsijani < > maziar.parsij...@gmail.com> wrote: > > > > I just search for words an alphabets in different languages with python > and > > my database is sqlite but

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Jens Alfke
> On Oct 18, 2018, at 11:17 AM, Maziar Parsijani > wrote: > > I just search for words an alphabets in different languages with python and > my database is sqlite but I need to do something to not getting error when > user input a wrong character like the ones that I told before.I can ban >

[sqlite] Strip leading "The" in alphabetical TOC?

2018-10-18 Thread Charles Leifer
Hi, In the documentation alphabetical listing, it threw me off when I was lookup up the JSON1 docs and didn't find them under "J", due to the title being "The JSON1 Extension". Just a suggestion: you might strip leading "The " from the titles in the documentation list?

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
hi, I just search for words an alphabets in different languages with python and my database is sqlite but I need to do something to not getting error when user input a wrong character like the ones that I told before.I can ban user to not input these characters but I am curious to find a way on

Re: [sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Larry Brasfield
Jordy Deweer asks: “Is there a way to use a SQLite database in a C# project, without installing / configuring / depending on the System.Data.SQLite libraries? I really hope there is.” If you do a web search for the combination of terms “SQLite”, “C#” and “library”, you will find several

[sqlite] Using SQLite in C# without System.Data.SQLite

2018-10-18 Thread Jordy Deweer
Dear all I am new to this group and this is my first question here. My question is as follows: Is there a way to use a SQLite database in a C# project, without installing / configuring / depending on the System.Data.SQLite libraries? I really hope there is. Thank you so much in advance for

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Bob Gailer
On Oct 18, 2018 5:59 AM, "Maziar Parsijani" wrote: > > Hi, > how could I ignore syntax errors like this? > > > *SELECT *,* > > > > * highlight(searchsimpleenhanced, 2, '', '') text* > > > > * FROM searchsimpleenhanced* > > > > * WHERE searchsimpleenhanced MATCH 'sth][';* As I understand the

Re: [sqlite] Error: dlsym(0x7fa073e02c60, sqlite3_sqliteicu_init): symbol not found

2018-10-18 Thread 邱朗
Hi, Thanks for look into it. I checked its readme https://www.sqlite.org/cgi/src/dir?ci=6cb537bdce85e088=ext/icu It does not mention tokenizer at all so I guess you are right, it probably does not support that at all. Qiulang At 2018-10-18 17:58:38, "Keith Medcalf" wrote: > >The ICU

Re: [sqlite] Error: dlsym(0x7fa073e02c60, sqlite3_sqliteicu_init): symbol not found

2018-10-18 Thread Keith Medcalf
The ICU extension (as in icu.c) does not contain the tokenizer ... it only contains the extension functions ... (upper / lower / etc) Looking in the amalgamation it appears that the icu tokenizer module is defined in fts3_icu.c I have no idea how you load a tokenizer module as part of a

[sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
Hi, how could I ignore syntax errors like this? > *SELECT *,* > > * highlight(searchsimpleenhanced, 2, '', '') text* > > * FROM searchsimpleenhanced* > > * WHERE searchsimpleenhanced MATCH 'sth][';* > there maybe nothing to match but I don't like to get syntax errors for a symbol or character

Re: [sqlite] Error: dlsym(0x7fa073e02c60, sqlite3_sqliteicu_init): symbol not found

2018-10-18 Thread 邱朗
Hi, Thanks for your reply. I change module name to libicu.so as you said then got Error: unknown tokenizer: icu sqlite> .load libicu.so sqlite> CREATE VIRTUAL TABLE zh_text USING fts4(text, tokenize=icu zh_CN); Error: unknown tokenizer: icu Why is that ? Is the whole point to build icu