Re: [sqlite] Is it possible to transpose a table using SQL?

2019-04-01 Thread Jake Thaw
Hi Shane, You might be interested in trying out my pivot virtual table implementation. https://github.com/jakethaw/pivot_vtab This will cater for changing values, but like a VIEW implementation, it does not satisfy your criteria of dynamically changing rows/columns. Changes to rows/columns can

Re: [sqlite] Need advice: Some queries show performance regression

2019-04-01 Thread Jinho Jung
Thanks for the quick response. 1) It seems our bisecting is wrong. We manually moved commit by commit by using "fossil checkout" command. Next time, we will use "fossil bisect" command. 2) Sorry for the misleading. Our first report contains three queries. We will submit another cases with correct

Re: [sqlite] Need advice: Some queries show performance regression

2019-04-01 Thread Richard Hipp
On 4/1/19, Jinho Jung wrote: > Hello, > > We are developing a tool called sqlfuzz for automatically finding > performance regressions in SQLite. sqlfuzz performs mutational fuzzing to > generate SQL queries that take more time to execute on the latest version > of SQLite compared to prior

[sqlite] Need advice: Some queries show performance regression

2019-04-01 Thread Jinho Jung
Hello, We are developing a tool called sqlfuzz for automatically finding performance regressions in SQLite. sqlfuzz performs mutational fuzzing to generate SQL queries that take more time to execute on the latest version of SQLite compared to prior versions. We hope that these queries would help

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Paul
As I was using the unchanged nuget package I assumed it would be a “default” encryption as it isn’t something I compiled or changed? Tithras Sent from my iPhone > On 1 Apr 2019, at 15:33, Simon Slavin wrote: > >> On 1 Apr 2019, at 3:30pm, Mattock Paul wrote: >> >> Thanks, do we have any

Re: [sqlite] importing a large TSV file

2019-04-01 Thread David Raymond
I believe it's basically saying that the way it's implemented, vacuum can't be rolled back, and therefore can't be done in the middle of a transaction, it has to be on its own. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of

Re: [sqlite] UPSERT with multiple constraints

2019-04-01 Thread David Raymond
Adding on to the other comments, I think the reason you can't do this is that each constraint could be violated by different rows. So with... create table foo (a int unique, b int unique); insert into foo values (1, 3), (2, 2), (3, 1); ...then when trying... insert into foo values (1, 2) on

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Simon Slavin
On 1 Apr 2019, at 3:30pm, Mattock Paul wrote: > Thanks, do we have any idea on what Algorithm is used? Since more than one algorithm is available, this would be something selected by the software you were using. So I can only suggest you read the source code for the bit of the software which

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Mattock Paul
Simon, Thanks, do we have any idea on what Algorithm is used? Tithras > On 01 April 2019 at 14:28 Simon Slavin wrote: > > > On 1 Apr 2019, at 1:15pm, Mattock Paul wrote: > > > Just to confirm I am using the nuget package (System.Data.SQLite v1.0.109.2) > > This uses PCL Crypto, which in

[sqlite] Documentation enhancement request: VACUUM

2019-04-01 Thread Simon Slavin
The documentation for VACUUM says "A VACUUM will fail if there is an open transaction" Could this statement be changed to make it clear whether this refers to other connections having an open transaction, and whether it means that VACUUM fill fail if it itself is inside a transaction ? I seem

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Simon Slavin
On 1 Apr 2019, at 2:41pm, Simon Slavin wrote: > BEGIN; >... CREATE all your INDEXes ... >VACUUM; -- optional > END; Apologies. The documentation says "A VACUUM will fail if there is an open transaction" I'm not sure whether this means that VACUUM must be outside the transaction,

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Simon Slavin
On 1 Apr 2019, at 12:14pm, Gert Van Assche wrote: > I need to create an SQLite db from a large TSV file. (30 GB) > Are there any setting I can give to the db so I can speed up the import? If you're doing it using the SQLite CLI tool, then just rely on the tool to do it in the most convenient

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Simon Slavin
On 1 Apr 2019, at 1:15pm, Mattock Paul wrote: > Just to confirm I am using the nuget package (System.Data.SQLite v1.0.109.2) This uses PCL Crypto, which in turn accesses crypto implemented in PCL itself rather than implmenting its own. A list of crypto methods it supports, tabled against OS,

Re: [sqlite] Is it possible to transpose a table using SQL?

2019-04-01 Thread Simon Slavin
On 1 Apr 2019, at 10:18am, Dominique Devienne wrote: > I can't seem to find that one, but I found another here: > https://metacpan.org/pod/SQLite::VirtualTable::Pivot I looked at that one, but it doesn't do what OP wants, which is to swap rows and columns without the programmer having to

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Donald Griggs
I believe it's also helpful to avoid creating indexes (and enforcing foreign keys) until after the import. On Mon, Apr 1, 2019 at 7:15 AM Gert Van Assche wrote: > Hi all, > > I need to create an SQLite db from a large TSV file. (30 GB) > Are there any setting I can give to the db so I can speed

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Mattock Paul
Jim, Thanks for the information. Just to confirm I am using the nuget package (System.Data.SQLite v1.0.109.2) and my sqlite database is encrypted without any additional modules associated with my release. A code snippet of the section which handles the initial database encryption is as

Re: [sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Jim Borden
From looking at the System.Data.SQLite source (someone please correct me if I am wrong) It would use whatever cipher was provided to it via the native library that it was deployed with. It's designed with sqlite encryption extension in mind but I suppose in theory it would work with any

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Domingo Alvarez Duarte
Hello Gert ! I normally do this (be aware that if there is a power outage the database is screwed): === PRAGMA synchronous = OFF; begin; --processing here commit; PRAGMA synchronous = ON; === Cheers ! On 1/4/19 13:14, Gert Van Assche wrote: Hi all, I need to create an SQLite db from

[sqlite] importing a large TSV file

2019-04-01 Thread Gert Van Assche
Hi all, I need to create an SQLite db from a large TSV file. (30 GB) Are there any setting I can give to the db so I can speed up the import? thank you Gert ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Drop table error with existing views

2019-04-01 Thread Domingo Alvarez Duarte
Hello Graham ! Thank you so much ! With this pragma I can continue to solve my problem as before. Cheers ! On 1/4/19 12:42, Graham Holden wrote: PRAGMA legacy_alter_table=ON ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Drop table error with existing views

2019-04-01 Thread Graham Holden
See https://www.sqlite.org/lang_altertable.html ... the ALTER TABLE command, by default, now alters references to it in triggers/views. To get the old behaviour, which I believe you need, use: PRAGMA legacy_alter_table=ON Graham Monday, April 01, 2019, 11:23:45 AM, Domingo Alvarez Duarte

[sqlite] Drop table error with existing views

2019-04-01 Thread Domingo Alvarez Duarte
Hello ! I'm using sqlite3 for a long time and I used to be able to drop tables that have views without error before but now it seems that it is not possible anymore. I mainly use it to restructure tables (add/move/remove fields) with something like this: PRAGMA foreign_keys=OFF;

[sqlite] Database Encryption (System.Data.SQLite)

2019-04-01 Thread Mattock Paul
All, Would anyone be able to confirm what cipher is used for encrypting an SQLite database when password="" is used? I have seen old posts online which state its 128bit but assume this is now wrong and am after completing a design document which requires I state the encryption level.

Re: [sqlite] Is it possible to transpose a table using SQL?

2019-04-01 Thread Dominique Devienne
On Mon, Apr 1, 2019 at 7:15 AM Shane Dev wrote: > [...]. By "dynamically changing table", I meant the number of columns and > rows could could change > after the dependant view was created. it appears this is impossible using > only SQL > It's possible using a virtual table, which years ago a