Re: [sqlite] VFS implementation for SoC

2019-04-12 Thread Arun - Siara Logics (cc)
Thank you. It appears that the POSIX function fsync of the SoC has some problem syncing to the local spiffs, but the whole thing works for an external SD filesystem. Regards Arun On Fri, 12 Apr 2019 18:58:36 +0530 Richard Hipp wrote > On 4/12/19, Arun - Siara Logics (cc) wr

Re: [sqlite] VFS implementation for SoC

2019-04-12 Thread Arun - Siara Logics (cc)
I/O error On Fri, 12 Apr 2019 17:47:21 +0530 Arun - Siara Logics (cc) wrote > I also tried INSERT on an existing database. This time the extended error > is 266. I am giving below the log. > Also, there are two warnings printed during open: > (21) API call

Re: [sqlite] VFS implementation for SoC

2019-04-12 Thread Arun - Siara Logics (cc)
: Write fn: FlushBuffer fn:FlushBuffer:Success fn:Write:Success fn: Sync fn: FlushBuffer fn: DirectWrite: fn:DirectWrite:Success fn:FlushBuffer:Success fn:Sync:Success SQL error: 266 disk I/O error Time taken:310381 us On Fri, 12 Apr 2019 17:30:14 +0530 Arun - Siara Logics (cc) wrote

Re: [sqlite] VFS implementation for SoC

2019-04-12 Thread Arun - Siara Logics (cc)
Hi, Thank you for the suggestion. The sqlite3_extended_errcode() is 1034 disk I/O error. Regards Arun On Fri, 12 Apr 2019 17:06:00 +0530 Richard Hipp wrote > On 4/12/19, Arun - Siara Logics (cc) wrote: > > fn:DirectWrite:Success > > fn:FlushBuffer:Success >

[sqlite] VFS implementation for SoC

2019-04-12 Thread Arun - Siara Logics (cc)
I am trying to implement the demo VFS provided at https://www.sqlite.org/src/doc/trunk/src/test_demovfs.c for a System on Chip (ESP32) that has its own inbuilt filesystem (spiffs), No changes have been made to the above code except, I had to add following code in the demoOpen method, just befor

[sqlite] (Info) Shox96 Compression as SQLite UDF

2019-02-27 Thread Arun - Siara Logics (cc)
Shox96 is a compression technique for Short Strings. It can achieve upto 65% compression. This technique is available for compressing text columns in SQLite as loadable extension in the repository https://github.com/siara-cc/Shox96_Sqlite_UDF. Output screenshot: https://github.com/siara-cc/Sho

Re: [sqlite] Reading a table from inside a scalar function

2019-02-18 Thread Arun - Siara Logics (cc)
. > > > >--- > >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...@maili

Re: [sqlite] Reading a table from inside a scalar function

2019-02-18 Thread Arun - Siara Logics (cc)
to the cell, then the function will always return the same value. So it can be deterministic and would work even if SQLite caches function results across queries. Am I correct? On Mon, 18 Feb 2019 19:18:21 +0530 Simon Slavin wrote > On 18 Feb 2019, at 1:15pm, Arun - Siara Logics

Re: [sqlite] Reading a table from inside a scalar function

2019-02-18 Thread Arun - Siara Logics (cc)
so. I guess sqlite3_exec() would take care of this, but is there a faster way? On Mon, 18 Feb 2019 16:55:23 +0530 Richard Hipp wrote > On 2/18/19, Arun - Siara Logics (cc) wrote: > > Hi, > > > > This is for an experimental feasibility study. I

Re: [sqlite] Reading a table from inside a scalar function

2019-02-18 Thread Arun - Siara Logics (cc)
> Yes it is possible, but then your UDF is unlikely to be *Deterministic*. By design, I intend to make sure that for any given input the function always returns the same value. If the dependent rows are missing or change over time, then it would be an error condition. What would be the recommend

[sqlite] Reading a table from inside a scalar function

2019-02-18 Thread Arun - Siara Logics (cc)
Hi, This is for an experimental feasibility study. Is it possible to read specific row(s) from a table within same db (using row ids) from inside a User defined Deterministic scalar function (C API)? If known, kindly point me to an existing open source implementation. Thanks Arun _

Re: [sqlite] Global UDF using sqlite3_create_function()?

2019-02-14 Thread Arun - Siara Logics (cc)
hway 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 Arun - Siara Logics > >(cc) > >Sent: Th

Re: [sqlite] Global UDF using sqlite3_create_function()?

2019-02-14 Thread Arun - Siara Logics (cc)
/19, Arun - Siara Logics (cc) wrote: > > > > The sqlite3_create_functions require the 'db' parameter to define a user > > defined function according to the doc: > > "The first parameter is the database connection to which the SQL function > > is &

[sqlite] Global UDF using sqlite3_create_function()?

2019-02-14 Thread Arun - Siara Logics (cc)
Hi, The sqlite3_create_functions require the 'db' parameter to define a user defined function according to the doc: "The first parameter is the database connection to which the SQL function is to be added. If an application uses more than one database connection then application-defined SQL fun

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-27 Thread Arun - Siara Logics (cc)
I have modified the database and updated the repository at https://github.com/siara-cc/employee_db. Given below is the revised script. Regards Arun CREATE TABLE employees ( emp_id INTEGER NOT NULL, birth_date DATE NOT NULL, first_name TEXT NOT NULL, la

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-23 Thread Arun - Siara Logics (cc)
I simply did a bzip2 of the db file, uploaded it using "git add" and "git commit". I just downloaded it now from "View Raw" and the shasum of the downloaded file matches with what I uploaded. shasum -a 256 ~/Downloads/employees.db.bz2 dd0b87d339494d2ee2f21a66a3b253f58c1a5517e7705427382c0ff8c5a

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-20 Thread Arun - Siara Logics (cc)
Hi Chris, James, Shawn, Thanks for the suggestions - I think they are quite relevant. I will modify and update soon. I kept the page size as 512 without rowid and dropped foreign keys so I could use it to demo SQLite on a low memory SoC ESP8266 (see https://github.com/siara-cc/esp_arduino_sql

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-19 Thread Arun - Siara Logics (cc)
ith '_no' are read as 'number' and so should be a number. OK, that > doesn't always work for 'telephone_no' (they usually start with a 0 ... > well, they do in the UK where I am...) > But I digress.. > > > Chris > > > On

[sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-19 Thread Arun - Siara Logics (cc)
=true Regards Arun - Siara Logics (cc) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Boosting insert and indexing performance for 10 billion rows (?)

2018-11-29 Thread Arun - Siara Logics (cc)
Without going into details of what your structure is, I suggest you look into "without rowid" option when creating the table. It reduces the overhead drastically. On Thu, 29 Nov 2018 18:59:26 +0530 Dominique Devienne wrote > On Wed, Nov 28, 2018 at 6:03 PM AJ M wrote: > > > [.

[sqlite] Sqlite Page Explorer

2018-11-28 Thread Arun - Siara Logics (cc)
Hi, Try my free and open source application to learn internal structure of SQLite databases. Explore the organisation of various objects such as schema, tables and indices. View hidden pages and data deleted. Available for Mac, WIndows and Linux. Applications: - Viewing internal organisation