Re: [sqlite] round function inconsistent

2019-05-24 Thread radovan5
In Delphi I have 2 functions that works (I override default sqlite round): const   ExtEps = 1.0842021725E-19;   DblEps = 2.2204460493E-16;   KnownErrorLimit = 1.234375;   SafetyFactor = 2;   MaxRelErrDbl = DblEps * KnownErrorLimit * SafetyFactor;   MaxRelErrExt = ExtEps * KnownErrorLimit *

Re: [sqlite] round function inconsistent

2019-05-24 Thread radovan5
said, it is IEEE754. Cheers! On 24 May 2019, at 08:27, radovan5 wrote: In Delphi I have 2 functions that works (I override default sqlite round): const ExtEps = 1.0842021725E-19; DblEps = 2.2204460493E-16; KnownErrorLimit = 1.234375; SafetyFactor = 2; MaxRelErrDbl = DblEps

Re: [sqlite] round function inconsistent

2019-05-24 Thread radovan5
Developers have problems using default round function so it is somethink we need. So I have:  ROUTINES FOR ROUNDING IEEE-754 FLOATS TO SPECIFIED NUMBER OF DECIMAL FRACTIONS   These routines round input values to fit as closely as possible to an   output number with desired number of decimal

Re: [sqlite] slow join, fast subselect

2019-04-17 Thread radovan5
Second select is not correct. You should have "from a" only not "from a,b". R.Antloga On 17.04.2019 10:55, Poor Yorick wrote: I've used the following two test queries in a version of sqlite built against a recent checkout of trunk, and also another recent version of sqlite. a.ref is indexed.

[sqlite] Changes in version 3.28.0 makes sql run slower

2019-12-06 Thread radovan5
Also tested with latest version 3.30.1. For showing problem I need just 2 tables (for join). -- cca 30.000.000 recs CREATE TABLE ARHDAJ(   ID_ARHDAJ integer primary key autoincrement,   ID_ARHPLA integer,   R integer,   O decimal(8,4),   Z decimal(12,2),   VEZA varchar(8) collate systemnocase);

Re: [sqlite] Changes in version 3.28.0 makes sql run slower

2019-12-06 Thread radovan5
10:33, Shawn Wagner wrote: Does running an ANALYZE have any impact? On Fri, Dec 6, 2019 at 12:47 AM radovan5 wrote: Also tested with latest version 3.30.1. For showing problem I need just 2 tables (for join). -- cca 30.000.000 recs CREATE TABLE ARHDAJ( ID_ARHDAJ integer primary key

Re: [sqlite] Changes in version 3.28.0 makes sql run slower

2019-12-06 Thread radovan5
Well I have to write sql like that because I must have one table in from. Some component I have depend on this. This has worked fast before but I have workaround so is not a problem. Regards Radovan On 06.12.2019 11:35, Keith Medcalf wrote: The join that you are using is not an outer join

Re: [sqlite] Changes in version 3.28.0 makes sql run slower

2019-12-06 Thread radovan5
Can you explain why workaround is fast. Why one version is fast and other slow. I'm talking about this change in where: "and R.ID_ARHDAJ is not null" to "and ifnull(R.ID_ARHDAJ,0) <> 0" For me analyze is no improvement because data is loaded from RDBMS and would have to run always after load.

Re: [sqlite] Changes in version 3.28.0 makes sql run slower

2019-12-06 Thread radovan5
ote: On 6 Dec 2019, at 10:05am, radovan5 wrote: Just in my case analyze is quite slow also. So in the end I get same time. It is faster to use just workaround in sql. The results of ANALYZE are stored in the database. So although the total time is about the same when you do run it,

Re: [sqlite] [FireDAC][Phys][SQLite]-326. Cannot perform the action, because the previous action is in progress.

2019-11-25 Thread radovan5
This is FireDAC error message not SQLite specific. I cannot reproduce it when using default FireDAC settings. But I think you must check Database ResourceOptions CmdExecMode. Change to am_NonBlocking. But I do not have to change that by default. Regards Radovan On 25.11.2019 18:34, Edson

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread radovan5
In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you should use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09,

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread radovan5
Hi, because sqlite calculate expression 30/57 as zero or 0. So this give then divide by zero error when 55/0 is calculated. Search more on google "Divide by 0 not giving error in sqlite". If you need to calculate you must change this so that one number has affinity real like this: select