Re: [sqlite] New SQLite Forum established - this mailing list is deprecated

2020-03-13 Thread x
* I truly hope Keith you'll continue making your tremendous contributions to the SQLite community. Ditto. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread x
Re my earlier post (which didn’t go out to mailing list) sqlite3_table_column_metadata(db,dbName,tblName,"rowid",0,0,0,0,0)==SQLITE_OK returns false if table tblName is a without rowid table seems to work for me. Sent from Mail for Windows 10

Re: [sqlite] Table has different rootpage in EXPLAIN and sqlite_master

2020-02-03 Thread x
? Was there another index or table whose root page is what was listed in the explain output? For example, were you expecting it to use the table, but it used a covering index instead? -Original Message- From: sqlite-users On Behalf Of x Sent: Monday, February 3, 2020 1:07 PM To: Discussion

[sqlite] Table has different rootpage in EXPLAIN and sqlite_master

2020-02-03 Thread x
Differing by 1. I noticed this today for 1 table only but not always - sometimes they were equal. I’ve been unable to reproduce it after a vacuum. Does this indicate a corrupt db or is it a case of it can happen for some reason I’ve missed? ___

Re: [sqlite] Is Comment column in 'EXPLAIN' blank?

2020-01-31 Thread x
ot; though. Is that setting one that's not reported by that pragma? -Original Message- From: sqlite-users On Behalf Of x Sent: Friday, January 31, 2020 6:22 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Is Comment column in 'EXPLAIN' blank? I get the comments using the shell b

[sqlite] Is Comment column in 'EXPLAIN' blank?

2020-01-31 Thread x
I get the comments using the shell but running an explain query in c++ using sqlite3.c (from 3.30 amalgamation) column 7 is returning blank in every row. Is something up or is it my code? ___ sqlite-users mailing list

Re: [sqlite] Find schema of a table in a query

2020-01-20 Thread x
Thanks Simon. From: sqlite-users on behalf of Simon Slavin Sent: Monday, January 20, 2020 4:49:04 PM To: SQLite mailing list Subject: Re: [sqlite] Find schema of a table in a query On 20 Jan 2020, at 2:53pm, x wrote: > Is this possible in sql? In

Re: [sqlite] Find schema of a table in a query

2020-01-20 Thread x
> select name from pragma_database_list d > where (select name from pragma_table_info(?1) where schema==d.name) > order by seq!=1, seq limit 1; Is this possible in sql? Given a variable ?1 which contains a valid attached DB name is it possible to retrieve the contents of ?1.table_name ??

Re: [sqlite] Find schema of a table in a query

2020-01-20 Thread x
us. The table search >order for unqualified names (when a search is required) is always in the >seq returned by pragma database_list, so > >select name > from pragma_database_list as d > where exists (select * > from pragma_table_info >where sche

Re: [sqlite] Find schema of a table in a query

2020-01-20 Thread x
they are. From: sqlite-users on behalf of Keith Medcalf Sent: Sunday, January 19, 2020 8:32:06 PM To: SQLite mailing list Subject: Re: [sqlite] Find schema of a table in a query On Sunday, 19 January, 2020 01:47, x wrote: >Suppose you’re given a query ‘SELECT 1 from tbl’ by a user and

Re: [sqlite] Find schema of a table in a query

2020-01-19 Thread x
. From: sqlite-users on behalf of Warren Young Sent: Sunday, January 19, 2020 4:02:40 PM To: SQLite mailing list Subject: Re: [sqlite] Find schema of a table in a query On Jan 19, 2020, at 2:41 AM, x wrote: > > I was hoping for something simpler. Such as?

Re: [sqlite] Find schema of a table in a query

2020-01-19 Thread x
On Sun, Jan 19, 2020 at 9:47 AM x wrote: > Suppose you’re given a query ‘SELECT 1 from tbl’ by a user and you want to > know the name of the schema that tbl belongs to. What’s the easiest way to > do this? Set an authorizer. Requires to write code though, cannot be done in S

[sqlite] Find schema of a table in a query

2020-01-19 Thread x
Suppose you’re given a query ‘SELECT 1 from tbl’ by a user and you want to know the name of the schema that tbl belongs to. What’s the easiest way to do this? I know sqlite will use temp.tbl if it exists else main.tbl if it exists else it will search for the earliest attached schema with a

Re: [sqlite] SQL help

2019-12-31 Thread x
LOL. English isnae oor furst language either. Ye ken whit a mean.  From: sqlite-users on behalf of Jose Isaias Cabrera Sent: Monday, December 30, 2019 9:50:22 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] SQL help x, on Saturday

Re: [sqlite] SQL help

2019-12-29 Thread x
Thanks Barry. I think that’s saying something like what I was saying but I put it better than them. I’m buoyed by the fact it’s not just Scottish education that could be done gooder  From: Barry Smith Sent: 28 December 2019 22:49 To: SQLite mailing

Re: [sqlite] SQL help

2019-12-28 Thread x
Thanks Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] SQL help

2019-12-28 Thread x
Consider the following sqlite> create table t1(a int, b int, c int); sqlite> create table t2(a int, b int); sqlite> insert into t1 values (1, 2, 3); sqlite> insert into t2 values (3, 4); sqlite> select a,(select b, c from t2 where t2.a=t1.a)=(3,3) from t1; 1| In the embedded select it takes c

Re: [sqlite] last occurrence of /*

2019-12-07 Thread x
It is possible using ‘with recursive’. The following is ugly and inefficient but might give you some ideas. with recursive cte (x,str) as (select 0,?1 union select x-1,substr(?1,x-1) from cte limit length(?1)) select str from cte where substr(str,1,2)='/*' order by -x limit 1

Re: [sqlite] [draft patch] interface for retrieving values of bound parameters

2019-11-11 Thread x
Is http://www.sqlite.org/c3ref/expanded_sql.html no use to you? From: sqlite-users on behalf of tab Sent: Monday, November 11, 2019 5:26:42 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] [draft patch] interface for retrieving values of bound

Re: [sqlite] Find stmt that's stopping a DB from closing

2019-11-05 Thread x
_ From: sqlite-users on behalf of Simon Slavin Sent: Tuesday, November 5, 2019 7:55:12 PM To: SQLite mailing list Subject: Re: [sqlite] Find stmt that's stopping a DB from closing On 5 Nov 2019, at 7:27pm, x wrote: > I’m sure the team added a fct that listed the offenders but

Re: [sqlite] Find stmt that's stopping a DB from closing

2019-11-05 Thread x
>I think you're referring to "The SQLITE_STMT Virtual Table": https://www.sqlite.org/stmt.html That’s it David. Thanks. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Find stmt that's stopping a DB from closing

2019-11-05 Thread x
I’m sure the team added a fct that listed the offenders but I can’t find it in the documentation. I would’ve thought it would have been mentioned on the sqlite3_close page but no sign of it. Am I imagining things? ___ sqlite-users mailing list

Re: [sqlite] 3.31

2019-11-04 Thread x
Thanks Richard. From: sqlite-users on behalf of Richard Hipp Sent: Monday, November 4, 2019 11:55:31 AM To: SQLite mailing list Subject: Re: [sqlite] 3.31 On 11/4/19, x wrote: > I’m eager to try out the new virtual columns (thanks Richard and t

[sqlite] 3.31

2019-11-04 Thread x
I’m eager to try out the new virtual columns (thanks Richard and team). Is it imminent or is there a beta for testing? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Minor Change Request: CURRENT_* functions also have SQLITE_FUNC_CONSTANT ?

2019-10-30 Thread x
Would any kind soul be willing to explain the deterministic problem to me? I can see that having now() in a virtual column would be a waste of time as the virtual column value would change every time it was read but if it was being stored then why not? Also, I take it deterministic udf’s can

Re: [sqlite] LEFT JOIN: ON vs. WHERE

2019-10-30 Thread x
I don’t think I did say that Marc. All I was saying was the ON didn’t have to refer to the closest join. select * from tblA inner join tblB ON tblA.key = tblC key – no mention of tblB in ON inner join tblC ON tblA.key = tblB.key; – no mention of tblC in ON Normally that would be written

Re: [sqlite] LEFT JOIN: ON vs. WHERE

2019-10-29 Thread x
If I remember correctly I found out by mistake that the ON doesn’t even have to relate to the JOIN it follows as long as it fits in with the WHERE. E.g. SELECT * FROM Tbl1 INNER JOIN Tbl2 ON Tbl3.Col=Tbl1.Col INNER JOIN Tbl3 ON Tbl2.Col=Tbl1.Col; Something like that.

Re: [sqlite] Stream loading SQL script

2019-10-27 Thread x
SQL script On Sunday, 27 October, 2019 07:40, x wrote: >Where is this function Keith? I can find any information on it? The SQLite3 command line shell (shell.c) reads input from stdin or other file and processes the commands one at a time by either calling the appropriate sqlite3 functi

Re: [sqlite] Stream loading SQL script

2019-10-27 Thread x
Where is this function Keith? I can find any information on it? From: sqlite-users on behalf of František Kučera Sent: Saturday, October 26, 2019 4:49:26 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Stream loading SQL script Dne 25.

Re: [sqlite] ALTER TABLE ADD COLUMN

2019-10-23 Thread x
Sent: Wednesday, October 23, 2019 2:09:19 PM To: SQLite mailing list Subject: Re: [sqlite] ALTER TABLE ADD COLUMN Wednesday, October 23, 2019, 1:53:10 PM, x wrote: > From the documentation > “A record might have fewer values than the number of columns in the > corresponding table. Th

[sqlite] ALTER TABLE ADD COLUMN

2019-10-23 Thread x
From the documentation “A record might have fewer values than the number of columns in the corresponding table. This can happen, for example, after an ALTER TABLE ... ADD COLUMN SQL statement has increased the number of columns in the table schema without modifying preexisting rows in the

Re: [sqlite] using lower function with utf8

2019-09-19 Thread x
Yes, I’m using v5 JcD. Thanks. From: sqlite-users on behalf of Jean-Christophe Deschamps Sent: Thursday, September 19, 2019 3:49:39 PM To: SQLite mailing list Subject: Re: [sqlite] using lower function with utf8 >I was messing about with this and tried the

[sqlite] using lower function with utf8

2019-09-19 Thread x
I was messing about with this and tried the following in sqlite expert professional select unicode(lower(char(256))); I was quite surprised when it responded with the correct result 257. Looking at the sqlite3.c code I can’t see anything that suggests sqlite would handle lower() for

Re: [sqlite] Warning - function 'sqlite3UserAuthCheckLogin' has internal linkage but is not defined

2019-08-01 Thread x
or https://www.sqlite.org/src/artifact/e6641021a9210364 -- 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.sqlite.org] On Be

[sqlite] Warning - function 'sqlite3UserAuthCheckLogin' has internal linkage but is not defined

2019-08-01 Thread x
I’m using the amalgamation in my Embarcadero Rad Studio 10 app (Clang compiler). I defined SQLITE_USER_AUTHENTICATION to test something and received the above warning along with the following two [bcc32c Warning] sqlite3.c(16307): function 'sqlite3UserAuthInit' has internal linkage but is not

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-30 Thread x
, 2019 7:07:15 PM To: SQLite mailing list Subject: Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect On 29 Jul 2019, at 5:44pm, x wrote: > It’s not as easy to get access to sqlite3TreeViewSelect on windows as it > would appear to be in the unix debugger. When I did find out how to

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-29 Thread x
Thanks Richard. I’ve being doing my best with the code but time is not on my side. It took me ages just to get the clang compiler to debug sqlite code (had to split the files). It’s not as easy to get access to sqlite3TreeViewSelect on windows as it would appear to be in the unix debugger.

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-29 Thread x
. "Hey, you aren't allowed to smoke during prayer!" "But I am, by special permission of the abbot!" "How come? I asked for permission to smoke during prayer and he declined!" "Well, I asked for permission to pray while smoking." -Ursprüngliche Nachricht- Von

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-29 Thread x
te-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von x Gesendet: Montag, 29. Juli 2019 10:05 An: SQLite mailing list Betreff: Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect >>Your implicit claim is "not all instances of column reference are reported to &

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-29 Thread x
>>Your implicit claim is "not all instances of column reference are reported to >>the authorizer, notably those inside a USING clause That and you’ve got to anticipate the order they’re sent to the callback in. ___ sqlite-users mailing list

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-28 Thread x
The following simple example might illustrate what I’m trying to achieve CREATE TABLE tbl0 (a INTEGER PRIMARY KEY, b INTEGER); CREATE TABLE tbl1 (a INTEGER PRIMARY KEY, c INTEGER); Suppose a user enters the following sql SELECT b, c FROM tbl0 INNER JOIN tbl1 USING (a) WHERE a > ?1; I want to

Re: [sqlite] [EXTERNAL] Help with sqlite3TreeViewSelect

2019-07-28 Thread x
eliver a row. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von x Gesendet: Samstag, 27. Juli 2019 14:08 An: SQLite mailing list Betreff: [EXTERNAL] [sqlite] Help with sqlite3TreeViewSelect g the lin I’ve been using this while debugging

[sqlite] Help with sqlite3TreeViewSelect

2019-07-27 Thread x
I’ve been using this while debugging by inserting the following code just before the return statement at the bottom of the sqlite3Select procedure. freopen("c:/SQLiteData/TreeView.txt","w",stdout); sqlite3TreeViewSelect(0, p, 0); freopen("CON","w",stdout); (NB above only works if you define

Re: [sqlite] [EXTERNAL] Determining valid statement placeholders.

2019-07-22 Thread x
Would sqlite3_expanded_sql(stmt) be of any use? https://sqlite.org/c3ref/expanded_sql.html From: sqlite-users on behalf of test user Sent: Monday, July 22, 2019 1:36:25 PM To: SQLite mailing list Subject: Re: [sqlite] [EXTERNAL] Determining valid

Re: [sqlite] Location of error in SQL statements ?

2019-05-07 Thread x
I think pzTail just points to the trailing ‘/0’ of zSql if an error occurs. From: sqlite-users on behalf of Rowan Worth Sent: Tuesday, May 7, 2019 9:07:34 AM To: SQLite mailing list Subject: Re: [sqlite] Location of error in SQL statements ? On Tue, 7 May

Re: [sqlite] Where are the likes of sqlite3_db and sqlite3_stmt defined?

2019-05-04 Thread x
Thanks Simon. From: sqlite-users on behalf of Simon Slavin Sent: Saturday, May 4, 2019 1:23:44 PM To: SQLite mailing list Subject: Re: [sqlite] Where are the likes of sqlite3_db and sqlite3_stmt defined? On 4 May 2019, at 11:16am, x wrote: > I can’t f

[sqlite] Where are the likes of sqlite3_db and sqlite3_stmt defined?

2019-05-04 Thread x
I can’t find any definition of them in the amalgamation code nor see any #included files that are likely to contain them. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Debugging sqlite3.c

2019-04-26 Thread x
If I put this line at the top of sqlite3.c #define SQLITE_DEBUG 1 should that be the same as setting SQLITE_DEBUG? I’ve tried it and the IDE still doesn’t add debug info for the sqlite3.c file. From: x<mailto:tam118...@hotmail.com> Sent: 26 April 2019 13:23 To: SQLite mailing list<mail

[sqlite] Debugging sqlite3.c

2019-04-26 Thread x
Could anyone give me an idiot’s guide on how to do this in the rad studio 10 IDE? I’ve tried adding DEBUG_SQLITE to “Project | Options | C++ (Shared Options) | Conditional defines ... (for Debug configuration – 32 bit Windows platform)” but it doesn’t seem to work. Looked elsewhere in the

Re: [sqlite] Help with sqlite3_value_text

2019-04-16 Thread x
t;-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of x >Sent: Monday, 15 April, 2019 04:08 >To: SQLite mailing list >Subject: Re: [sqlite] Help with sqlite3_value_text > >>As long as you use _value_bytes after

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread x
>As long as you use _value_bytes after _text you're fine... so if any >conversion did take place the value will be right of the last returned >string type. JD, Could you explain that to me? I’m not sure why any conversion takes place and, on reading the text below, I would’ve thought it would be

Re: [sqlite] Help with sqlite3_value_text

2019-04-14 Thread x
On second thoughts JD, can’t use strlen or sqlite3_value_bytes in case values(1) contains more than a single unicode character. This looks OK. # define CHARLEN(x) !(x & 128) ? 1 : (x & 16 ? 4 : (x & 32 ? 3 : 2)) char *c = (char *)sqlite3_value_text(values[0]); char

Re: [sqlite] Help with sqlite3_value_text

2019-04-14 Thread x
From: J Decker Sent: 13 April 2019 20:05 To: SQLite mailing list Subject: Re: [sqlite] Help with sqlite3_value_text >> char *c = (char *)sqlite3_value_text(values[0]); >> char *Sep = (char *)sqlite3_value_text(values[1]); >>

Re: [sqlite] Help with sqlite3_value_text

2019-04-13 Thread x
This seems to work OK as a sqlite function. // assume values[0] & [1] are supplied and not null // find Count of values[1] in values[0] char *c = (char *)sqlite3_value_text(values[0]); char *Sep = (char *)sqlite3_value_text(values[1]); int Byte1, Count=0, NrBytes, NrSepBytes =

Re: [sqlite] Help with sqlite3_value_text

2019-04-13 Thread x
Thanks for all the help. Things are much clearer now. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread x
Thanks for the replies. There’s plenty for me to look at there. I’ve been in poor health the last 5 years and after almost a year’s break I’m trying to get back into sqlite to preserve my sanity. I’m so rusty my opening post is riddled with errors. I’ve just realised that, before my break, I

[sqlite] Help with sqlite3_value_text

2019-04-12 Thread x
I’m still confused by utf strings. For simplicity, suppose I set up an sqlite function that takes a single string parameter and I want to scan the string to count the number of occurrences of a certain character . If I knew the string was made up entirely of ascii chars I’d do this char *c =

Re: [sqlite] pragma database_list

2019-01-24 Thread x
Thanks Richard. From: sqlite-users on behalf of Richard Hipp Sent: Thursday, January 24, 2019 3:09:33 PM To: SQLite mailing list Subject: Re: [sqlite] pragma database_list On 1/24/19, x wrote: > Forgetting the temp db, Is the list guarant

[sqlite] pragma database_list

2019-01-24 Thread x
Forgetting the temp db, Is the list guaranteed to be in the same order the databases were attached in? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Determine collation associated with sort

2018-06-30 Thread x
>I think it's explaned in the docs here: >https://sqlite.org/datatype3.html#collation Thanks Luuk. That’s what I was looking for. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Determine collation associated with sort

2018-06-30 Thread x
Suppose I have a select such as ‘select * from TblsAndJoins where Condns order by OrdCol1,OrdCol2,...,OrdColn’ I want to know the collation associated with the sort. I know a COLLATE condition could be attached to the order by BUT suppose there’s none. How would I determine the collation

Re: [sqlite] Shouldn't have to specify primary key explicitly

2018-06-28 Thread x
INTEGER PRIMARY KEY doesn’t default to autoincrement. It’s used in place of the automatically created autoincrement rowid but you have to supply the values (I.e. they’re not created automatically). On 28 Jun 2018, at 12:48, Scott Robertson wrote: > SQLite is supposed to autoincrement by

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-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
>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

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-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-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
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-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-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-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
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
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] .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-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-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

[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] [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] Reset the cursor

2018-06-04 Thread x
If the first loop exits with res3 == SQLITE_DONE then !result will be true and the second loop should process exactly the same (assuming underlying data is unchanged). I can’t see why the code below wouldn’t work although I’m confused by the fact you say that sqlite3_step(stmt3) returns

Re: [sqlite] Reset the cursor

2018-06-04 Thread x
To: SQLite mailing list Subject: Re: [sqlite] Reset the cursor x, On Mon, Jun 4, 2018 at 9:42 AM, x wrote: > int result = 0, res3 = SQLITE_OK; > for( ; ; ) > { > res3 = sqlite3_step( stmt3 ); >

Re: [sqlite] Reset the cursor

2018-06-04 Thread x
int result = 0, res3 = SQLITE_OK; for( ; ; ) { res3 = sqlite3_step( stmt3 ); if( res3 == SQLITE_ROW ) As I said in previous post a successful sqlite3_step doesn’t return SQLITE_OK so res3 == SQLITE_ROW is

Re: [sqlite] Reset the cursor

2018-06-04 Thread x
Sorry, just looked that up. 1 is SQLITE_ERROR. 100 is SQLITE_ROW But note that a successful sqlite3_step does not return SQLITE_OK (0). Are you maybe converting the result to Boolean? From: sqlite-users on behalf of Igor Korot Sent: Monday, June 4, 2018

Re: [sqlite] Reset the cursor

2018-06-04 Thread x
Igor, if sqlite3_step is successful it returns SQLITE_ROW which is 1. From: sqlite-users on behalf of Igor Korot Sent: Monday, June 4, 2018 1:52:05 PM To: SQLite mailing list Subject: Re: [sqlite] Reset the cursor Hi, On Mon, Jun 4, 2018 at 7:54 AM, Igor

Re: [sqlite] This is driving me nuts

2018-05-31 Thread x
Yes, I think you’re right. I suppose maybe it recognises the desc sequence from page access. From: sqlite-users on behalf of Andy Ling Sent: Thursday, May 31, 2018 3:57:27 PM To: 'SQLite mailing list' Subject: Re: [sqlite] This is driving me nuts > While

Re: [sqlite] This is driving me nuts

2018-05-31 Thread x
c 9534 After desc 9535 After asc 8585 After desc 8586 Tom From: sqlite-users on behalf of Clemens Ladisch Sent: Thursday, May 31, 2018 2:06:08 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] This is driving me nuts x wrote: &g

Re: [sqlite] This is driving me nuts

2018-05-31 Thread x
>While SQLite reads more and more rows from your database, Windows caches more >and more pages from the file, explaining the physical available memory >diminishes, which does not mean SQLite, nor your program 'use' it: the OS does. Olivier, your post makes perfect sense but the above begs the

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-28 Thread x
> why, when you've got 16 GB ram, does a 6.4 GB vector cause any problems? Jim, it was only 3.2 GB and it was compiled as 64 bit just in case you’re thinking 32. >Either this statement is wrong, or you've misattributed the 4 GB of memory. Rowan, I’ve misattributed. There’s a bug in the

Re: [sqlite] This is driving me nuts

2018-05-28 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? It has very little data of its own and just calls a function declared in the main thread. ___ sqlite-users mailing list

Re: [sqlite] This is driving me nuts

2018-05-28 Thread x
rc = VirtualLock(memPtr, memSize); >if (!rc) >{ >VirtualFree(memPtr, 0, MEM_RELEASE); >return -4; >} > rc = sqlite3_config(SQLITE_CONFIG_HEAP, memPtr, (int)memSize, 64); >if (rc != SQLITE_OK) >{ >

Re: [sqlite] This is driving me nuts

2018-05-27 Thread x
Starting to mess about with windows handles and pages I’ve never heard of is beyond my pain threshold Abrozy. Thanks anyway. From: sqlite-users on behalf of Abroży Nieprzełoży

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();

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-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-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

  1   2   3   >