Re: [sqlite] Feature request, sqlite3_stmt_action

2019-05-10 Thread siscia
Working with RediSQL another use case comes to mind for some implementation of the interface we were discussing. How to detect SELECT statements that return empty. SQLite simply return SQLITE_DONE in all cases, and it makes impossible to know if it is an empty SELECT or something else. A

Re: [sqlite] SQLite version 3.28.0 beta 1

2019-04-13 Thread siscia
I would really support this other approach. It seems more extensible and eventually would address on of my pain points in SQLite, not knowing what type of statement is being executed. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___

[sqlite] Feature request, sqlite3_stmt_action

2019-03-27 Thread siscia
Hi List, I would like to propose a feature and I believe here is the best place. Please keep in mind that I am ready to work on a patch for this feature if needed, but I would like to discuss it here first. I would like to propose a function (named `sqlite3_stmt_action` for the sake of

Re: [sqlite] [EXTERNAL] Distinguish type of statements

2019-03-20 Thread siscia
Thanks! Indeed I was already aware of the `sqlite3_stmt_readonly()` function. But it is not enough in my case. I really need to distinguish between UPDATE, DELETE and INSERT Cheers, Simone -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___

Re: [sqlite] Distinguish type of statements

2019-03-19 Thread siscia
Hi Simon, Thanks! Indeed I thought about a similar solution but it seems a little contrived. Do you think it would be possible to add a function that does what I need? How is the design coordinated? Where should I post my RFC? Cheers, Simone -- Sent from: http://sqlite.1065341.n5.nabble.com/

[sqlite] Distinguish type of statements

2019-03-19 Thread siscia
Hi All, I am already afraid that the answer to the question will be "no", but it will save a lot of development effort on my side, so is worth to ask. Given a statement, is there any way to know if it is an UPDATE, DELETE, INSERT, SELECT or something else? Thanks, Simone -- Sent from:

Re: [sqlite] Optmize queries on ranges

2018-10-26 Thread siscia
Sorry, I was a little too optimistic. Making the starts unique does help only for some queries, not for all. Why? Cheers, Simone -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Optmize queries on ranges

2018-10-26 Thread siscia
Ok, after the message I thought a little bit more. And it turns out that in the database the `start`s are not unique how they should. Making them unique, seems to solve the performance problem completely. However, still, I am not sure why the `LIMIT 1` does not help at all. Can you guys shed

Re: [sqlite] Optmize queries on ranges

2018-10-26 Thread siscia
Hi all, thanks for your suggestions, unfortunately, I already tried all of them, except for the rtrees. Actually, my request for help wasn't complete. The ranges I am storing in the table are not overlapping. To make an example in SQL. The following can be in the dataset: INSERT INTO

[sqlite] Optmize queries on ranges

2018-10-25 Thread siscia
Hi all, I am facing an interesting optimization problem. I have a table like this: CREATE TABLE ranges ( start int, end int, value int, ); The query that I am interested in optimizing is "select value from ranges where (? between start and end)" The max performance that I was able

[sqlite] Creating a new virtual table error "no such module $VTAB_MODULE_NAME" error

2018-06-12 Thread siscia
am missing? For reference the code is here: https://gist.github.com/siscia/c6c8c6637f93e56a70a226e1ab643ab4 -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.o