[sqlite] Can stmt SQL be changed?

2017-02-02 Thread x
For a while I got away with this sqlite3_stmt *stmt; if (sqlite3_prepare16_v2(DB, L”sql statement”, -1, , NULL) != SQLITE_OK) throw exception(“.”); // use stmt sqlite3_reset(stmt); if (sqlite3_prepare16_v2(DB, L”different sql

Re: [sqlite] Help with custom collation

2017-02-02 Thread x
ite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with custom collation On 02/02/2017 02:08 AM, x wrote: > Thanks Clemens. You’re right about changing the UTF8String* to char* as it > now works but when trying it with a column containing Unicode characters it > didn’t. I’d hav

Re: [sqlite] Can stmt SQL be changed?

2017-02-02 Thread x
y 2017 10:41 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Can stmt SQL be changed? On 2 Feb 2017, at 9:28am, x <tam118...@hotmail.com> wrote: > The reused stmt was the only possible culprit so I’m wondering if it’s down > to the changed

[sqlite] sqlite3_complete

2017-02-08 Thread x
sending the text into SQLite for parsing. These routines return 1 if the input string appears to be a complete SQL statement. A statement is judged to be complete if it ends with a semicolon token and is not a prefix of a well-formed CREATE TRIGGER statement. sqlite3_complete(“x”) returns false

Re: [sqlite] sqlite3_complete

2017-02-08 Thread x
mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] sqlite3_complete On 2/8/17, Richard Hipp <d...@sqlite.org> wrote: > On 2/8/17, x <tam118...@hotmail.com> wrote: >> >> It checks the input is appended with a semi-colon? Surely I’m

Re: [sqlite] sqlite3_complete

2017-02-08 Thread x
to:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] sqlite3_complete On 2017/02/08 6:45 PM, x wrote: > OK, thanks Richard. When I first discovered the function I was hoping it > would do more than it said on the tin. > Do more? Like what? Perhaps Richard's effort to be bri

Re: [sqlite] Can stmt SQL be changed?

2017-02-02 Thread x
Re: [sqlite] Can stmt SQL be changed? On 2/2/17, x <tam118...@hotmail.com> wrote: > For a while I got away with this > > sqlite3_stmt *stmt; > > if (sqlite3_prepare16_v2(DB, L”sql statement”, -1, , NULL) != > SQLITE_OK) > throw exce

[sqlite] Help with custom collation

2017-02-01 Thread x
The collation function used was as follows int Compare(void* Data, int Len1, const void *s1, int Len2, const void *s2) { const UTF8String *S1 = static_cast(s1), *S2 = static_cast(s2); return 0; } Which was registered with the following code if

Re: [sqlite] Help with custom collation

2017-02-01 Thread x
17 17:32 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with custom collation x wrote: > int Compare(void* Data, int Len1, const void *s1, int Len2, const void *s2) > { > const UTF8String *S1 = static

Re: [sqlite] Help with custom collation

2017-02-02 Thread x
Thanks for the advice Jens. My problem is the software I use (Embarcadero c++ builder) is more utf16 orientated. It does support utf8 but many of the built in functions return System.UnicodeString which is utf16. From: Jens Alfke Sent: 02 February 2017 17:32 To:

[sqlite] Using with clause in update statement

2017-01-25 Thread x
If I replace the following statement UPDATE SomeTable SET SomeCol = Col1 * (LongWindedFormala) + Col2 * (LongWindedFormala) + ... with WITH CTE(X) AS (SELECT LongWindedFormula) UPDATE SomeTable SET SomeCol = Col1 * (SELECT X FROM CTE) + Col2 * (SELECT X FROM CTE) + . Is ‘(SELECT X

Re: [sqlite] sqlite3_complete

2017-02-09 Thread x
bject: Re: [sqlite] sqlite3_complete On 2017/02/08 8:47 PM, x wrote: > Thanks, it certainly looks more useful with that additional info. I sometimes > have to pass SQL to my own currently unsophisticated parser before I can send > it to prepare and hoped it would help with that

Re: [sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
. Once it does that, see if the performance is ok. If not, writing better queries that run efficiently is probably orders of magnitude more important than the difference between comparing "rowids" and "keys". -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sq

Re: [sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
Subject: Re: [sqlite] Packing integer primary key with field bits On 2017/08/10 4:51 PM, x wrote: > Valid point on the intended range Gunter. I don’t know enough about sqlite to > fully understand your index cell paragraph. I thought the way sqlite worked > was e.g. to get the value of

Re: [sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
za> wrote: > On 2017/08/10 1:19 PM, x wrote: > >> Thanks for the replies. I’m not sure I agree with Gunter and Ryan though. >> I’m thinking about this more from the gain in speed rather than saving >> space. >> >> To clarify, I’m suggesting replacing a compo

Re: [sqlite] Packing integer primary key with field bits

2017-08-11 Thread x
I’m wishing I had kept my mouth shut now  It’s starting to get a bit above my head as programming’s little more than a hobby for me. Although I’ve been using c++ builder for a long time I only got round to trying to learn c++ properly a couple of years back during a lengthy illness. I even

[sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
As in cramming numerous integer columns into a 64 bit integer. Does anyone do this? Is the speed gain worth the additional confusion of extracting the columns from the key? How is it best accomplished (virtual table maybe)? ___ sqlite-users mailing

Re: [sqlite] Packing integer primary key with field bits

2017-08-12 Thread x
Cheers Ryan. From: R Smith<mailto:rsm...@rsweb.co.za> Sent: 11 August 2017 11:14 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Packing integer primary key with field bits On 2017/08/11 10:21 AM, x wrote: > I’m wishin

Re: [sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
Saving a minimum of 7 bytes I meant. From: x<mailto:tam118...@hotmail.com> Sent: 10 August 2017 12:19 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Packing integer primary key with field bits Thanks for the replies. I’m not sure I agree

Re: [sqlite] Packing integer primary key with field bits

2017-08-10 Thread x
uires more disk space than the 4-12 bytes per record we have "saved"). Additionally, if any of the statements returns more than one row for any "real rowid" then your table is shot up beyond repair... -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users

Re: [sqlite] hex and char functions

2017-08-08 Thread x
::UnicodeString::System::UnicodeString::operator [](const int)' Ambiguity between X and X?? I had no such problems earlier yesterday but, as it was working fine when I first encountered the ‘\u0085’ problem, I doubt it’s the debugger. I conducted the following experiment in SQLite Expert Pro

Re: [sqlite] LSM1 extension

2017-08-09 Thread x
n Tue, Aug 8, 2017 at 12:54 PM, x <tam118...@hotmail.com> wrote: > Thanks Richard. > > From: Richard Hipp<mailto:d...@sqlite.org> > Sent: 08 August 2017 18:47 > To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> > Subject: Re: [sqlite] LSM1 e

Re: [sqlite] hex and char functions

2017-08-09 Thread x
017 03:29 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] hex and char functions On 8 August 2017 at 18:32, x <tam118...@hotmail.com> wrote: > Why does it always turn out to be my own fault ☹ > Welcome to programming ;) It's very

Re: [sqlite] LSM1 extension

2017-08-08 Thread x
I keep reading about this LSM1 but can’t find anything about it beyond tickets. Any links? From: Jens Alfke Sent: 08 August 2017 18:04 To: SQLite mailing list Subject: Re: [sqlite] LSM1 extension > On Aug 4, 2017, at 9:12

Re: [sqlite] hex and char functions

2017-08-08 Thread x
133 inside the udf after retrieval using sqlite3_value_text16. Why does it always turn out to be my own fault ☹ Many thanks to all who contributed. From: x<mailto:tam118...@hotmail.com> Sent: 08 August 2017 09:24 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org>

Re: [sqlite] LSM1 extension

2017-08-08 Thread x
Thanks Richard. From: Richard Hipp<mailto:d...@sqlite.org> Sent: 08 August 2017 18:47 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] LSM1 extension On 8/8/17, x <tam118...@hotmail.com> wrote: > I keep reading about this LSM1 bu

Re: [sqlite] hex and char functions

2017-08-07 Thread x
:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] hex and char functions On 2017/08/07 5:29 PM, x wrote: > Apologies, I should have said I was using c++ builder Berlin on windows 10 > and that UnicodeString was UTF16. > > I thought I had learned enough about this string

[sqlite] hex and char functions

2017-08-07 Thread x
In c++ I tried to call a sqlite udf using the following sql UnicodeString SQL=“select udf(‘5\u00856’);” Which was prepared using sqlite3_prepare16_v2. (I was experimenting with sending a udf a group of numbers without getting involved with blobs). Debugging the udf I recovered the string

Re: [sqlite] hex and char functions

2017-08-07 Thread x
such as TStringList etc are utf16. From: Igor Tandetnik<mailto:i...@tandetnik.org> Sent: 07 August 2017 15:49 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] hex and char functions On 8/7/2017 9:38 AM, x wrote: > Related >

[sqlite] Including sqlite3ext.h instead of sqlite3.h

2017-08-19 Thread x
I was trying to work out how to load extensions today. Currently I’ve just got the amalgamation file included in my project. Started by replacing #include “sqlite3.h” with #include “sqlite3ext.h” in all my source files. I then tried compiling the project but received a string of error messages

[sqlite] operator precedence

2017-06-25 Thread x
Is there a reason why sqlite doesn’t follow the c convention? e.g. & and | have equal precedence in sqlite. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] operator precedence

2017-06-26 Thread x
Thanks for the replies. I noticed a while back that when I compiled using the 64 bit compiler (I’m using c++ builder 10.1 which I think is clang) it gave warnings when || and && were mixed but not bracketed. Was worried I had missed something. From: Simon Slavin

Re: [sqlite] Does prepare do arithmetic?

2017-05-29 Thread x
Re: [sqlite] Does prepare do arithmetic? x wrote: > The explain for > > Select * from Tbl where Col = (select min(OtherCol) from OtherTbl); > > I’m having problems with. EXPLAIN Select * from Tbl where Col = (select min(OtherCol) from OtherTbl); addr opcode p1p2

Re: [sqlite] Does prepare do arithmetic?

2017-05-29 Thread x
ite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Does prepare do arithmetic? On 5/29/17, x <tam118...@hotmail.com> wrote: > Thanks Clemens, that clears that up. > > I’m still left wondering though why it calculates 2+2 every step in > > ‘select 2+2 from Tbl;’ > All resul

Re: [sqlite] Does prepare do arithmetic?

2017-05-29 Thread x
sqlite] Does prepare do arithmetic? On 2017/05/29 4:05 PM, x wrote: > Thanks Richard. I can’t claim to fully understand the part about the app > calling sqlit3_column_text but I’m reassured that leaving the arithmetic to > sqlite is the way to go. Actually what Richard is saying

Re: [sqlite] Does prepare do arithmetic?

2017-05-29 Thread x
Thanks for the reply Gunter. The reason I added “from Tbl” was so there would be more than 1 step involved. The explains require a fair knowledge of the opcodes for more complex queries so I’m still not totally sure as to the answer to my question. Assuming I’m reading the explains properly,

Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h

2017-08-20 Thread x
Thanks Dan. It now compiles but gives me warnings about ‘sqlite3_api’ being defined in more than one module. ‘sqlite3ext.h’ is included in several files although I only added the SQLITE_EXTENSION_INIT1 line to one such file. > This morning I tried creating a new blank package on c++ builder

Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h

2017-08-20 Thread x
09:21 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h On 08/20/2017 02:33 PM, x wrote: > This morning I tried creating a new blank package on c++ builder and then > added > > #i

Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h

2017-08-20 Thread x
This morning I tried creating a new blank package on c++ builder and then added #include “sqlite3ext.h” Same error message : E245 Undefined symbol ‘sqlite3_api’. Is there some define I should have set? Full code //---

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
>Thanks to you, this topic has inspired a useful change or changes. Wow. Glad I could help. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-28 Thread x
l columns are defined as NOT NULL. If they are allowed to be NULL then it can still be left out provided the NOT NULL condition(s) is added to the where. Using the earlier example Select BaseTbl.RowID from BaseTbl left join Tbl_1 on Tbl_1.X = BaseTbl.X Inner join Tbl_2 on Tbl2.Y = BaseTbl.Y left

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
t computes ‘select count(*) from .’ and sets ColSQL to ‘select ColList from ... limit ?1, ?2’ so that it still fits in with the ‘fetch a range of data’ modus operandi and also allows a record counter and vertical scrollbar positioning. ***Example select ColList from BaseTbl left join Tbl_

Re: [sqlite] Foreign key help

2017-11-28 Thread x
for you. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >On 28 Nov 2017, at 3:26pm, x <tam118...@hotmail.com> wrote: > >> If I have foreign keys in place but always have foreign_keys = OFF >then one day start

Re: [sqlite] Foreign key help

2017-11-28 Thread x
28 Nov 2017, at 3:26pm, x <tam118...@hotmail.com> wrote: > If I have foreign keys in place but always have foreign_keys = OFF then one > day start SQLite with foreign_keys = ON what happens? Does SQLite suddenly > check all foreign keys and report / delete violations or

[sqlite] Foreign key help

2017-11-28 Thread x
If I have foreign keys in place but always have foreign_keys = OFF then one day start SQLite with foreign_keys = ON what happens? Does SQLite suddenly check all foreign keys and report / delete violations or does it leave everything as is and just enforce foreign keys from that point on?

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-25 Thread x
Simon, I’ve no users. I’ve been teaching myself c++ (and SQLite) during a lengthy illness so this is just experimentation for me. This subject touches on a previous question of mine you were involved in regarding redundant tables. The following may jog your memory create table TblA(A

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-26 Thread x
Thanks Keith. This one Update the omit-table-from-left-join optimization so that it can omit tables from the middle of the join as well as the end. Deals with the case I mentioned in my last post but this one is also interesting Fix a problem preventing the planner from identifying scans that

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-26 Thread x
> If it’s joined to the BaseTbl by an integer primary key or FULLY joined by a > unique index then the table is redundant. I’m talking there. If it’s an inner join SQLite needs to check the record exists in the joined table. Sorry about that, back to left joins.

[sqlite] Getting an advance list of RowIDs for a query result set

2017-11-24 Thread x
For a complex query you can often get a list of the base table RowIDs very quickly with a simple query and then use an array of those values (along with the carray virtual table) to retrieve sections of data from the complex query almost instantly. I've been doing this for a while but would

[sqlite] help with EXPLAIN QUERY PLAN

2017-11-23 Thread x
Can anyone tell me why the detail column sometime states ‘USING INDEX ’ and other time ‘USING COVERING INDEX ...’? At first I thought USING COVERING INDEX implied the search was searching only the first m columns of an n column index (m less than n) but I’ve also seen USING COVERING INDEX

Re: [sqlite] [EXTERNAL] help with EXPLAIN QUERY PLAN

2017-11-23 Thread x
[EXTERNAL] help with EXPLAIN QUERY PLAN COVERING INDEX means that all required fields for the query can be read from the index alone, without accessing the row itself. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von x Gesendet

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
From: E.Pasma Sent: 26 November 2017 17:30 To: SQLite mailing list Subject: Re: [sqlite] Getting an advance list of RowIDs for a query result set >If step 3 is xxx-ed and only left-joins remain to be considered then >the

Re: [sqlite] What happens if an in memory database runs out of memory

2017-12-16 Thread x
ut of memory On 15 Dec 2017, at 8:36pm, x <tam118...@hotmail.com> wrote: > I’ll have to look into how to increase the in-memory pager cache. Before you do anything like that, ask yourself two questions: a) Is my program actually fast enough without any of these weird picky measures ?

Re: [sqlite] What happens if an in memory database runs out of memory

2017-12-18 Thread x
>To get clarity, are you saying the 33% speedup is the gain of the >non-Indexed vs. Indexed table, or due to setting that cache size on the >already in-memory DB? (The latter would be worrying). Ryan, It seemed unaffected by cache size. The slight gain in speed (~0.2 secs) for the 2 million

[sqlite] What happens if an in memory database runs out of memory

2017-12-15 Thread x
Suppose I execute “attach :memory: as mem” and then create a table in mem that requires more space than the available RAM can hold what will happen? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] What happens if an in memory database runs out of memory

2017-12-15 Thread x
;mailto:d...@sqlite.org> Sent: 15 December 2017 19:11 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] What happens if an in memory database runs out of memory On 12/15/17, x <tam118...@hotmail.com> wrote: > Suppose I execute “attach :memory: as m

Re: [sqlite] What happens if an in memory database runs out of memory

2017-12-15 Thread x
list Subject: Re: [sqlite] What happens if an in memory database runs out of memory On 12/15/17, x <tam118...@hotmail.com> wrote: > > Is there any easy way of creating a table that will use mem for speed but > revert to disc for backup if memory runs out? > Make the database

[sqlite] Get result of 'pragma foreign_keys' in c programme

2017-11-20 Thread x
I thought sqlite3_prepare16_v2(DB,"pragma foreign_keys",-1,,NULL) would work but it doesn’t return SQLITE_OK. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with left joins

2017-11-20 Thread x
Sent: Monday, November 20, 2017 3:55:42 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Help with left joins On 2017/11/20 5:33 PM, x wrote: >> Only if ColB, ColC and ColD are unique in their tables. Otherwise each join >> has the potential of returning multiple row

Re: [sqlite] Help with left joins

2017-11-20 Thread x
? From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Simon Slavin <slav...@bigfraud.org> Sent: Monday, November 20, 2017 12:34:29 PM To: SQLite mailing list Subject: Re: [sqlite] Help with left joins On 20 Nov 2017, at 11:09a

[sqlite] Help with left joins

2017-11-20 Thread x
Suppose TblB has primary key ColB and contains a column ColBX TblC has primary key ColC and contains a column ColCX TblD has primary key ColD and contains a column ColDX TblA has primary key ColA and also contains columns ColB, ColC and ColD (i.e. TblB, TblC and TblD are effectively lookup

Re: [sqlite] Help with left joins

2017-11-20 Thread x
>Only if ColB, ColC and ColD are unique in their tables. Otherwise each join >has the potential of returning multiple rows, which will carry over to the >next joins. Thanks David, I did say ColB, ColC & ColD were primary keys. ___ sqlite-users mailing

[sqlite] Timing issue with min, max and count

2017-12-08 Thread x
I have a table with 2.4 million records. It’s a without rowid table (I don’t know if that’s significant) with an integer primary key (ID) and several secondary indexes of the form (OtherCol, ID). If I run select min(ID), max(ID), count(*) from BigTbl; It takes 0.67 secs If I run the three

Re: [sqlite] Timing issue with min, max and count

2017-12-08 Thread x
>But these special optimizations only apply when min(), max(), and count(*) are used in isolation. Hence, they do not work for the first query above that uses all three functions at one. Thanks Richard. >(1) If you are using INTEGER PRIMARY KEY, you should *not* be using a WITHOUT ROWID. You

Re: [sqlite] UPDATE SET using column-name-list Syntax error

2017-12-10 Thread x
>UPDATE test SET (a, b) = "vala", "valb" ; Should that not be (a, b) = (‘vala’, ‘valb’); >UPDATE test SET (a, b) = (SELECT "vala", "valb") ; Should that not be (a, b) = ((SELECT ‘vala’), ‘valb’); ___ sqlite-users mailing list

Re: [sqlite] What happens if an in memory database runs out of memory

2017-12-20 Thread x
Just seen this Each temporary table and index is given its own page cache which can store a maximum number of database pages determined by the SQLITE_DEFAULT_TEMP_CACHE_SIZE compile-time parameter. (The default value is 500 pages.) The maximum number of database pages in the page cache is the

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread x
SELECT COUNT(*)+1 FROM TABLE WHERE NAME < (SELECT NAME FROM TABLE WHERE ID = 3) (I think) From: sqlite-users on behalf of Hegde, Deepakakumar (D.) Sent: Friday, April 27, 2018 3:51:27

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread x
How about SELECT ID,NAME, (SELECT COUNT(*) FROM TABLE WHERE NAME<=(SELECT NAME FROM TABLE WHERE ID=d.ID)) as Position FROM TABLE d ORDER BY ID; sqlite> create table t(ID,name text); sqlite> insert into t values (1,'AAA'),(2,'ZZZ'),(3,'BBB'),(4,'WWW'),(5,'CCC'); sqlite> select

Re: [sqlite] [EXTERNAL] Re: sqlite3_progress_handler(D,N,X,P)

2018-05-25 Thread x
Thanks Max. It is a bit less cryptic. From: Max Vlasov<mailto:max.vla...@gmail.com> Sent: 25 May 2018 15:29 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] [EXTERNAL] Re: sqlite3_progress_handler(D,N,X,P) On Fri, May 25, 2018 at 10:29 A

[sqlite] sqlite3_progress_handler(D,N,X,P)

2018-05-24 Thread x
The parameter N is the approximate number of virtual machine instructions<https://sqlite.org/opcode.html> that are evaluated between successive invocations of the callback X. Would it not have been better if N was the number of milliseconds between invocations? It’s not much use if yo

Re: [sqlite] sqlite3_progress_handler(D,N,X,P)

2018-05-24 Thread x
? From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of R Smith <ryansmit...@gmail.com> Sent: Thursday, May 24, 2018 5:03:14 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] sqlite3_progress_handler(D,N,X,P) On 201

Re: [sqlite] [EXTERNAL] sqlite3_progress_handler(D,N,X,P)

2018-05-24 Thread x
igames.at> Sent: Thursday, May 24, 2018 5:16:45 PM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] sqlite3_progress_handler(D,N,X,P) If you want elapsed milliseconds, you can set a timer and call sqlite3_interrupt() to have sqlite quit executing the query as soon as possible. Th

Re: [sqlite] [EXTERNAL] Re: sqlite3_progress_handler(D,N,X,P)

2018-05-25 Thread x
oun...@mailinglists.sqlite.org> on behalf of Hick Gunter <h...@scigames.at> Sent: Thursday, May 24, 2018 5:49:21 PM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] Re: sqlite3_progress_handler(D,N,X,P) I can't tell without extensively looking into the source code. I expect not. From my experience I

Re: [sqlite] [EXTERNAL] Selecting multiple similar columnname.

2018-06-08 Thread x
Does ‘hidden’ apply to normal tables as well as virtual tables? I tried CREATE TABLE t(x,y,z hidden); select * from t; but it showed all three cols. From: sqlite-users on behalf of Hick Gunter Sent: Friday, June 8, 2018 7:03:56 AM To: 'SQLite mailing

Re: [sqlite] .timer

2018-06-16 Thread x
I’m trying to add fileio.c to my core_init function so I can investigate if the readfile and writefile functions would help here. I’ve added #include “fileio.c” Inside the core_init function what do I add ? nErr += sqlite3_auto_extension((void(*)())sqlite3_fileio_init); //

Re: [sqlite] .timer

2018-06-16 Thread x
s a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of x >Sent: Friday, 15 June, 2018 10:53 >To: SQLite mailing list >Subject: Re: [sqlite] .timer > >Thanks Keith. I did look on th

Re: [sqlite] .timer

2018-06-14 Thread x
ent: Thursday, June 14, 2018 9:08:31 AM To: SQLite mailing list Subject: Re: [sqlite] .timer On 14 Jun 2018, at 8:33am, x wrote: > Could someone describe what the return values real, user and sys mean and why > there’s sometimes a big difference between real and the sum of u

Re: [sqlite] ___fixunsdfdi

2018-06-18 Thread x
From: sqlite-users on behalf of Guy Harris Sent: Monday, June 18, 2018 11:45:38 AM To: SQLite mailing list Subject: Re: [sqlite] ___fixunsdfdi On Jun 18, 2018, at 3:21 AM, x wrote: > I’m using c++ builder 10.2 Tokyo on windows 10 pro. > In a console app I’m getting this error message > >

[sqlite] ___fixunsdfdi

2018-06-18 Thread x
I’m using c++ builder 10.2 Tokyo on windows 10 pro. In a console app I’m getting this error message [ilink32 Error] Error: Unresolved external '___fixunsdfdi' referenced from C:\...\PROJECTS\WIN32\DEBUG\SQLITE3.OBJ I can’t find any mention of it in sqlite3.h or sqlite3.c. Anyone know anything

Re: [sqlite] .timer

2018-06-16 Thread x
> Yeah, I had a lot of problems with the fileio.c extension after the fsdir > virtual table was added. It needs a >header file "test_windirent.h" to be > available. That was the first thing I had to fix. The compiler couldn’t find the test_windirent.h file. I added the .../sqlite/src path to

Re: [sqlite] .timer

2018-06-16 Thread x
l RAM to see what happened. I will report that in a moment as I expect explosions and fireworks! .echo on .timer on .eqp on .stats on pragma temp_store=file; pragma cache_size=5120; --- create table t ( x integer not null, y text collate nocase not null ); --- --- Use either the generate

Re: [sqlite] .timer

2018-06-14 Thread x
lable RAM - pre flush = 12.913 GBs - post flush = 14.1749 GBs sqlite> create table test as -- creates test table with 100 million rows ...> with recursive cte(x,y) as ...> (values(1,'012345678901234567890123456789') ...> union all select x+1,y from cte where x<1) .

Re: [sqlite] .timer

2018-06-15 Thread x
lem or if that just brought out some other issue in the windows kernel itself. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.s

Re: [sqlite] .timer

2018-06-14 Thread x
a light it shows sqlite in. From: sqlite-users on behalf of R Smith Sent: Thursday, June 14, 2018 10:34:58 AM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] .timer On 2018/06/14 10:28 AM, x wrote: > Thanks for the detail Simon.

Re: [sqlite] .timer

2018-06-15 Thread x
Thanks Keith. I did look on the performance page but didn’t realise clicking the items on the left brought up different info. I am on windows 10 pro. I haven’t had time to try creating the ‘personalised’ sqlite3.exe so the following relates to my own app run under the original conditions (i.e.

Re: [sqlite] .timer

2018-06-17 Thread x
the 1960's I believe -- cannot remember who to attribute it to though). --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlit

Re: [sqlite] .timer

2018-06-17 Thread x
2018-06-04 19:24:41 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .timer on sqlite> .open mytemp.db sqlite> create table test as -- creates test table with 100 million rows

Re: [sqlite] .timer

2018-06-17 Thread x
>Richard was saying he had sped up LIMIT queries in 3.24. I checked this out >and was running LIMIT queries >in sqlite expert (3.23.1) and my app (3.24). >The former was taking 3 times as long to run the queries (not >sure how much >of that was down to improvements or sqlite expert). Anyway, I

[sqlite] .timer

2018-06-14 Thread x
Could someone describe what the return values real, user and sys mean and why there’s sometimes a big difference between real and the sum of user & sys?. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] .timer

2018-06-15 Thread x
a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of x >Sent: Friday, 15 June, 2018 00:50 >To: SQLite mailing list >Subject: R

Re: [sqlite] .timer

2018-06-15 Thread x
>Actually I cannot reproduce even if I turn off forced RANDOM mode for the >cache, reduce the size of the >sqlite3 cache to the default, and make sure the >temp_store is on disk (not my default). Are you rebooting or flushing the cache between the commands? I don’t have any problems (except

Re: [sqlite] .timer

2018-06-15 Thread x
cted to a transient in-memory database. >Use ".open FILENAME" to reopen on a persistent database. >sqlite> create table test as -- creates test table with 100 million >rows > ...> with recursive cte(x,y) as > ...> (values(1,'012345678901234567890123456789') >

Re: [sqlite] This is driving me nuts

2018-05-26 Thread x
ld call shrink_to_fit to free additional memory. http://en.cppreference.com/w/cpp/container/vector/shrink_to_fit What's the value returned by sqlite3_memory_highwater after executing the query? http://www.sqlite.org/c3ref/memory_highwater.html 2018-05-26 17:43 GMT+02:00, x : > I'm usin

[sqlite] This is driving me nuts

2018-05-26 Thread x
I'm using c++ builder 10.2 tokyo on windows 10 and sqlite 3.23.1. I was working on code that stored RowIDs in a vector. I was sizing the vector beforehand and then timing how long it took to store the RowIDs returned by an sqlite query. By accident I sized the vector too big (by a factor of 10)

Re: [sqlite] This is driving me nuts

2018-05-26 Thread x
. From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Warren Young <war...@etr-usa.com> Sent: Saturday, May 26, 2018 8:54:33 PM To: SQLite mailing list Subject: Re: [sqlite] This is driving me nuts On May 26, 2018, at 9:43 AM, x <tam118

Re: [sqlite] This is driving me nuts

2018-05-26 Thread x
ree additional memory. http://en.cppreference.com/w/cpp/container/vector/shrink_to_fit What's the value returned by sqlite3_memory_highwater after executing the query? http://www.sqlite.org/c3ref/memory_highwater.html 2018-05-26 17:43 GMT+02:00, x : > I'm using c++ builder 10.2 tokyo on windows

Re: [sqlite] This is driving me nuts

2018-05-31 Thread x
to any other app. From: sqlite-users on behalf of Clemens Ladisch Sent: Thursday, May 31, 2018 11:50:19 AM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] This is driving me nuts x wrote: > I’ve written the console app below to illustrate. It pri

Re: [sqlite] This is driving me nuts

2018-05-31 Thread x
> I’ve just discovered the thread in the original app decreases the > available memory by around 4 GB. Are they really that expensive? After others pointed out threads weren’t that expensive I concluded there was a bug in my code. On checking though I couldn’t find anything wrong yet the

Re: [sqlite] This is driving me nuts

2018-05-27 Thread x
I’ve changed the app to populate v with the query result and noted the free ram before and after each resize. I’m hoping that addresses some of the concerns re compiler optimisations even if it doesn’t supply any real answers? Results were similar to before. #include #include #pragma hdrstop

Re: [sqlite] This is driving me nuts

2018-05-27 Thread x
Strange. I repeated the test with v an int64 array (see below) however the FreeMB() doesn’t change. Both Memi’s return pretty much the value of Mem ??? for (int i=0; i<2; i++) { v=new int64_t[Size[i]]; int64_t Memi=FreeMBs();

  1   2   3   >