Re: [sqlite] Artificially slow VACUUM by injecting a sleep() somewhere?

2014-12-08 Thread Max Vlasov
On Mon, Dec 8, 2014 at 5:56 PM, Roger Binns rog...@rogerbinns.com wrote: On 12/07/2014 04:43 PM, David Barrett wrote: so I'm curious if you can think of a way using the API (or any other way) to essentially nice the process by inserting a short sleep into whatever loop runs inside the VACUUM

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Max Vlasov
On Thu, Dec 4, 2014 at 10:44 AM, Baruch Burstein bmburst...@gmail.com wrote: Is it possible to somehow search for/replace a string in all columns of all tables? Not particularity the answer to your question, but rather a method you or others might use. I once implemented a virtual table

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Max Vlasov
I once implemented a virtual table allvalues that outputs all database values with (hope self-explaining) fields TableName, TableRowId, FieldName, Value Could you expand on how you coped with the underlying database changing, and how you mapped virtual table rowids to the actual database

[sqlite] Is msvcrt coupling now unavoidable (3.8.7)?

2014-10-22 Thread Max Vlasov
Hi, my static linking with Delphi for 3.7.8 version now complains about _beginthreadex_/_endthreadex_. Quick search shows than everywhere there's a recommendation to use these functions instead of API CreateThread if one plans to use Visual c run-time (msvcrt). All my previous linking with

Re: [sqlite] Is msvcrt coupling now unavoidable (3.8.7)?

2014-10-22 Thread Max Vlasov
On Wed, Oct 22, 2014 at 4:50 PM, dave d...@ziggurat29.com wrote: -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Max Vlasov Sent: Wednesday, October 22, 2014 5:25 AM To: General Discussion of SQLite Database

Re: [sqlite] New DLLs and sources. Was: SQLite version 3.8.5 beta

2014-06-03 Thread Max Vlasov
On Tue, May 27, 2014 at 10:49 PM, Richard Hipp d...@sqlite.org wrote: On Tue, May 27, 2014 at 10:50 AM, Richard Hipp d...@sqlite.org wrote: This time I build the 32-bit DLL using mingw instead of MSVC. (MSVC was still used for the 64-bit DLL.) So perhaps it will work correctly on WinXP.

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-05-10 Thread Max Vlasov
On Fri, Feb 21, 2014 at 5:24 PM, Richard Hipp d...@sqlite.org wrote: On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov max.vla...@gmail.com wrote: Is there a machine-readable (BNF or other) grammar as equivalent to the current syntax diagrams? An updated version of all-bnf.html has now been

Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Max Vlasov
On Wed, May 7, 2014 at 6:31 PM, Richard Hipp d...@sqlite.org wrote: On Wed, May 7, 2014 at 9:00 AM, Marco Bambini ma...@sqlabs.net wrote: What is the best way to know if a table has been created with the WITHOUT ROWID option? (1) You could send SELECT rowid FROM table (2) Run both

[sqlite] CTE in views for older versions

2014-04-20 Thread Max Vlasov
Hi, noticed that attempt to open a database containing a view Create vew ... with recursive ... ... with older (non-cte) versions of sqlite failed. The call to open_v2 was ok, but any access for example to PRAGMA encoding led to malformed database schema error. Although it came as no big

Re: [sqlite] Why sqlite has no sqlite_bind_auto or similary named function

2014-04-18 Thread Max Vlasov
On Fri, Apr 18, 2014 at 8:08 PM, Andy Goth andrew.m.g...@gmail.com wrote: On 4/18/2014 12:29 AM, Max Vlasov wrote: So it seems like if general queries allow affinity automatical selection while bind api does not have the corresponent function. I know that I can analize incoming data myself

[sqlite] Why sqlite has no sqlite_bind_auto or similary named function

2014-04-17 Thread Max Vlasov
Hi, The problem was with my program that automatically converts xml data into an sqilte table. It looks for an attribute and appends a column if it does not exists, but stating no particular type. All values were appended with sqlite_bind_text. Everything was fine, but an index created after this

Re: [sqlite] about the apparently arriving soon threads

2014-04-08 Thread Max Vlasov
On Tue, Apr 8, 2014 at 11:00 PM, big stone stonebi...@gmail.com wrote: Hi, I did experiment splitting my workload in 4 threads on my cpu i3-350m to see what are the scaling possibilities. Timing : 1 cpu = 28 seconds 2 cpu = 16 seconds 3 cpu = 15 seconds 4 cpu = 14 seconds If the info

Re: [sqlite] comma-separated string data

2014-04-07 Thread Max Vlasov
On Sun, Apr 6, 2014 at 10:23 PM, Dominique Devienne ddevie...@gmail.com wrote: If the answer to either question above is true, then a specialized vtable would be both more convenient and faster, no? Hmm... If logical peculiarity of vtable approach (when where-constrained queries might be

Re: [sqlite] comma-separated string data

2014-04-05 Thread Max Vlasov
On Fri, Apr 4, 2014 at 10:20 PM, peter korinis kori...@earthlink.net wrote: A data column in a link table contains comma-separated string data, where How do you 'parse' a table entry like: 4,66,51,3009,2,678, . to extract these values and use them in an SQL statement, perhaps a WHERE id='66'?

Re: [sqlite] Difference in virtual tables logic triggered between version 3.7.15.2 to 3.8.0

2014-04-05 Thread Max Vlasov
On Sat, Apr 5, 2014 at 11:48 PM, Max Vlasov max.vla...@gmail.com wrote: This works for an old version of sqlite (3.6.10), but today Dominique Devienne mentioned some doubt about this approach and I decided to test it with some data with a recent version of sqlite. With 3.8.4.3 the same join

Re: [sqlite] Goodram C50 SSD slow in SQlite benchmark

2014-03-23 Thread Max Vlasov
On Mon, Mar 24, 2014 at 4:49 AM, piotr maliński riklau...@gmail.com wrote: I know it's bad. I'm trying to determine the cause of the difference, and if it's a feature of that SSD or a bug of some sort. There was a very intensive discussion for a post labeled UPDATE/INSERTing 1-2k rows slower

Re: [sqlite] Using a customized collate function to mimic integer array type.

2014-03-21 Thread Max Vlasov
On Fri, Mar 21, 2014 at 8:06 PM, Ben Peng ben@gmail.com wrote: I guess I will have to take the longer route, namely define a customized comparison function and translate user input internally. There's an also virtual table method, probably not so easy to wrap the head around, but this one

Re: [sqlite] which of these is faster?

2014-03-14 Thread Max Vlasov
On Thu, Mar 13, 2014 at 11:06 PM, Richard Hipp d...@sqlite.org wrote: Once you do that, you'll see that the opcode sequence is only slightly different between the two. They should both run at about the same speed. I doubt you'll be able to measure the difference. Actually a comparatively

Re: [sqlite] which of these is faster?

2014-03-14 Thread Max Vlasov
On Fri, Mar 14, 2014 at 4:51 PM, Richard Hipp d...@sqlite.org wrote: In the original problem, there was already an index on the term for which the min() was requested. . Whit your CTE-generated random integers, there is not an index on the values. So SELECT min(x) FROM... does a linear

[sqlite] Observations about CTE optimization

2014-03-10 Thread Max Vlasov
Many CTE queries are just some mini-algorithms with iteration and only last row is required. I just wondered whether it's easy to do this without order by ... of the outer query (also mentioned in my reply about CTE sqrt). There's a solution, but the good news is that probably one rarely needs

Re: [sqlite] RPAD/LPAD

2014-03-08 Thread Max Vlasov
On Sat, Mar 8, 2014 at 10:52 AM, Max Vlasov max.vla...@gmail.com wrote: On Fri, Mar 7, 2014 at 11:51 PM, Dominique Devienne ddevie...@gmail.com wrote: basically register_function('rpad', 'x', 'y', 'printf(''%-*s'', y, x)') would register a 2-arg function (register_function's argc-2) named

Re: [sqlite] Suggestion to add locate as a broader version of instr

2014-03-08 Thread Max Vlasov
On Sat, Mar 8, 2014 at 2:24 AM, big stone stonebi...@gmail.com wrote: Ooups ! Thanks to the awesome posts about RPAD/LPAD, I understood that I could already create a sqrt() function for SQLite3 in interpreted python. Yes, that discussion was inspiring :) Looking at your task I also

Re: [sqlite] RPAD/LPAD

2014-03-07 Thread Max Vlasov
On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne ddevie...@gmail.com wrote: I think what SQLite lacks is a syntax to define custom function like it does for virtual tables. Something like: create function rpad(x, y) using scripty_module as return PRINTF('%-*s',y,x); Nice suggestion.

Re: [sqlite] RPAD/LPAD

2014-03-07 Thread Max Vlasov
On Fri, Mar 7, 2014 at 6:39 PM, Clemens Ladisch clem...@ladisch.de wrote: Max Vlasov wrote: Nice suggestion. This probably falls into case when a small new part needed on sqlite side Actually, no change to SQLite itself would be needed. It's possible to create an extension that provides

Re: [sqlite] RPAD/LPAD

2014-03-07 Thread Max Vlasov
On Sat, Mar 8, 2014 at 2:16 AM, Clemens Ladisch clem...@ladisch.de wrote: Eduardo Morras wrote: So, if a webapp that uses SQLite doesn't check it's input, functions that renames SQLite internals can be injected SELECT register_simple_function('MAX', 1, 'DROP TABLE ?'); Such a statement

Re: [sqlite] RPAD/LPAD

2014-03-07 Thread Max Vlasov
On Fri, Mar 7, 2014 at 11:51 PM, Dominique Devienne ddevie...@gmail.com wrote: basically register_function('rpad', 'x', 'y', 'printf(''%-*s'', y, x)') would register a 2-arg function (register_function's argc-2) named $argv[0], which executes the following statement with args($argv[1],

Re: [sqlite] Virtual table API performance

2014-03-02 Thread Max Vlasov
On Sun, Mar 2, 2014 at 5:21 PM, Elefterios Stamatogiannakis est...@gmail.com wrote: Our main test case is TPCH, a standard DB benchmark. The lineitem table of TPCH contains 16 columns, which for 10M rows would require 160M xColumn callbacks, to pass it through the virtual table API. These

Re: [sqlite] Virtual Table Functions

2014-03-01 Thread Max Vlasov
On Fri, Feb 28, 2014 at 10:14 PM, Dominique Devienne ddevie...@gmail.com wrote: Can someone tell me how the statement below works? Thanks for any help on this. This is really puzzling to me. --DD Very puzzling for me too For any statement like this select * from blablabla(123)

Re: [sqlite] Virtual table API performance

2014-03-01 Thread Max Vlasov
Hi, thanks for explaining your syntax in another post. Now about virtual tables if you don't mind. On Fri, Feb 28, 2014 at 8:24 PM, Eleytherios Stamatogiannakis est...@gmail.com wrote: If we load into SQLite, create table newtable as select * from READCOMPRESSEDFILE('ctable.rc'); it

Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Max Vlasov
On Wed, Feb 26, 2014 at 12:33 PM, Fabrice Triboix ftrib...@falcon-one.com wrote: And even then, that would not explain why the journal file lingers after re-opening the database. I remember asking a similar question. As long as I remember, the main logical implication is that journal file

[sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
Hi, Is there a machine-readable (BNF or other) grammar as equivalent to the current syntax diagrams? http://www.sqlite.org/syntaxdiagrams.html The only one a little similar I found is http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34 ( mentioned as art/syntax/all-bnf.html ) but it's

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 4:47 PM, Richard Hipp d...@sqlite.org wrote: On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov max.vla...@gmail.com wrote: Is there a machine-readable (BNF or other) grammar as equivalent to Not that I am aware of. I just noticed the file ( bubble-generator-data.tcl

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 5:24 PM, Richard Hipp d...@sqlite.org wrote: On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov max.vla...@gmail.com wrote: The only one a little similar I found is http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34 ( mentioned as art/syntax/all-bnf.html

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Max Vlasov
On Mon, Feb 17, 2014 at 2:27 PM, Simon Slavin slav...@bigfraud.org wrote: On 17 Feb 2014, at 7:59am, Max Vlasov max.vla...@gmail.com wrote: So the nanosec example modified Select v-v from ( Select nanosec() as v from TestTable ) ...shows non-zero values

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Max Vlasov
On Mon, Feb 17, 2014 at 7:00 PM, RSmith rsm...@rsweb.co.za wrote: On 2014/02/17 09:59, Max Vlasov wrote: . So Select nanosec() - nanosec() from ... returns non-zero values for most of the times, so there's no guarantee the user functions or any other functions will be called once

Re: [sqlite] Once again about random values appearance

2014-02-16 Thread Max Vlasov
On Mon, Feb 17, 2014 at 1:22 AM, James K. Lowden jklow...@schemamania.orgwrote: On Fri, 14 Feb 2014 08:32:02 +0400 Max Vlasov max.vla...@gmail.com wrote: From: Max Vlasov max.vla...@gmail.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Reply-To: General Discussion

[sqlite] Suggestion to add locate as a broader version of instr

2014-02-14 Thread Max Vlasov
Hi, Some time ago when there was no instr functions, I looked at Mysql help pages and implemented a user function locate as the one that allows searching starting a particular position in the string. With two parameters form it was just identical to instr only the order of parameters was

[sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
Hi, probably was discussed and modified before, but I still can not understand some peculiarities with random column values. The table Create table [TestTable] ([id] integer primary key) populated with 100 default values (thanks to CTE now made with a single query): with recursive

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
On Thu, Feb 13, 2014 at 4:26 PM, Richard Hipp d...@sqlite.org wrote: On Thu, Feb 13, 2014 at 4:45 AM, Max Vlasov max.vla...@gmail.com wrote: Hi, probably was discussed and modified before, but I still can not understand some peculiarities with random column values. It is undefined

Re: [sqlite] Once again about random values appearance

2014-02-13 Thread Max Vlasov
On Fri, Feb 14, 2014 at 6:35 AM, James K. Lowden jklow...@schemamania.orgwrote: select id, (select id from TestTable where id = abs(random() % 100)) as rndid from TestTable where id=rndid On Thu, 13 Feb 2014 07:26:55 -0500 Richard Hipp d...@sqlite.org wrote: It is undefined behavior,

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-24 Thread Max Vlasov
On Thu, Jan 23, 2014 at 1:33 AM, dean gwilliam mgbg25...@blueyonder.co.uk wrote: I'm just wondering what my options are here? Any advice much appreciated. ___ My two cents... Historically I took Aducom TDataSet-compatible classes

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-24 Thread Max Vlasov
On Fri, Jan 24, 2014 at 9:16 PM, Ralf Junker ralfjun...@gmx.de wrote: On 24.01.2014 10:06, Max Vlasov wrote: BCC 5.5 (freely downloadable) compiles any version of sqlite3 to object files linkable to Delphi 5 and later, the only drawback I Don't know about DISQLite3 , but one of the main

[sqlite] Sqlite as a platform performance comparison tool

2014-01-06 Thread Max Vlasov
Hi, A thought came to compare two computers of different platforms (ie i386 vs ARM) using uniform approach. We take two binaries of the same sqlite version compiled with the best c compilers for both platforms and compare the time spent for identical operations using memory based databases (to

Re: [sqlite] Virtual Table: misuse error on sqlite3_declare_vtab()

2013-10-04 Thread Max Vlasov
Simon, don't know what exactly wrong in your particular case, but I'd suggest setting debugger breakpoints everywhere in your x-handlers and notice the moment after which calls are ceased (or you get a error code). Max On Fri, Oct 4, 2013 at 6:07 PM, Simon turne...@gmail.com wrote: Hi there,

[sqlite] Why latest places.sqlite from firefox can't be opened by some older versions of sqlite

2013-08-31 Thread Max Vlasov
Hi, I noticed that opening places.sqlite of my installation of Firefox can't be made for example with sqlite 3.6.10, it says that file either encrypted or invalid (everything ok for example with 3.7.15.2 and sure firefox itself, it works :)). This might be a failure of my particular installation

Re: [sqlite] Why latest places.sqlite from firefox can't be opened by some older versions of sqlite

2013-08-31 Thread Max Vlasov
On Sat, Aug 31, 2013 at 10:14 PM, Richard Hipp d...@sqlite.org wrote: On Sat, Aug 31, 2013 at 2:03 PM, Max Vlasov max.vla...@gmail.com wrote: Hi, I noticed that opening places.sqlite of my installation of Firefox can't be made for example with sqlite 3.6.10, it says that file either

[sqlite] Group by in sqlite 3.8 works a little differently depending on the spaces at the end

2013-08-28 Thread Max Vlasov
Hi, the following query (notice the space at the end of the 3rd string) Create table [TestTable] ([Title] TEXT); INsert into TestTable (Title) VALUES ('simple text'); INsert into TestTable (Title) VALUES ('simple text'); INsert into TestTable (Title) VALUES ('simple text '); select Trim(Title)

Re: [sqlite] Group by in sqlite 3.8 works a little differently depending on the spaces at the end

2013-08-28 Thread Max Vlasov
On Wed, Aug 28, 2013 at 5:11 PM, Igor Tandetnik i...@tandetnik.org wrote: On 8/28/2013 8:57 AM, Max Vlasov wrote: See the recent discussion at http://comments.gmane.org/gmane.comp.db.sqlite.general/83005 It's not about trailing spaces, but about whether Title in GROUP BY resolves to mean

Re: [sqlite] How to create connection life-time object?

2013-07-26 Thread Max Vlasov
Hi, Dušan On Thu, Jul 25, 2013 at 2:39 PM, Dušan Paulovič paulo...@gisoft.cz wrote: Hello, is there a way to somehow set a connection life-time object? ... It would be fine to have something like: int sqlite3_set_lifetime_object( sqlite3 *db, /*db connection*/ const

Re: [sqlite] How to create connection life-time object?

2013-07-26 Thread Max Vlasov
On Fri, Jul 26, 2013 at 9:56 PM, Dušan Paulovič paulo...@gisoft.cz wrote: Thanks for suggestion, but: 1.) one object is not linked to one connection If you have your own memory management, it's not a problem since the scheme I described is basically just a storage of pointers. To free or not

[sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
I've created a kind of triple storage base with Sqlite db as the container. Basically it's several tables implementing Object-Propery-Value metaphor. There's only one field for data so thinking about generality I assumed that the type for the data field should be TEXT of nothing since most of

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 1:32 PM, Clemens Ladisch clem...@ladisch.de wrote: But REAL will sort the strings '1', '10', '2' wrong. What do you mean by wrong? The test CREATE TABLE testtable (id integer primary key, value real); insert into testtable (value) values ('1'); insert into testtable

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 1:38 PM, Dan Kennedy danielk1...@gmail.com wrote: On 07/23/2013 02:52 PM, Max Vlasov wrote: So par adoxically probably the best type for universal field container is REAL (or NUMERIC) since it will accept data of any type, but has advantage of best sorting

Re: [sqlite] Is REAL the best universal data type?

2013-07-23 Thread Max Vlasov
On Tue, Jul 23, 2013 at 10:09 PM, Petite Abeille petite.abei...@gmail.comwrote: On Jul 23, 2013, at 9:52 AM, Max Vlasov max.vla...@gmail.com wrote: Basically it's several tables implementing Object-Propery-Value metaphor Hurray! The Entity–attribute–value (EAV) anti-pattern! pattern

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-09 Thread Max Vlasov
at 8:20 AM, Max Vlasov max.vla...@gmail.com wrote: Richard, It makes sense, but I see here some possibility of future confusion. Correct me if I'm wrong. Currently if I have a vfs that requires special preparations (for example, decompression), I have two choices, either provide V2

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-08 Thread Max Vlasov
On Sun, Apr 7, 2013 at 2:12 PM, Max Vlasov max.vla...@gmail.com wrote: On Thu, Apr 4, 2013 at 4:02 PM, Richard Hipp d...@sqlite.org wrote: We would like to encourage people to try out the new code and report both success and failure. Not particulary about this draft version, but about

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-08 Thread Max Vlasov
On Mon, Apr 8, 2013 at 1:23 PM, Dan Kennedy danielk1...@gmail.com wrote: Right. But a VFS is not obliged to support the new xFetch() and xUnfetch() methods (used to read data from a memory mapped file). And if it doesn't, SQLite will use xRead() exclusively. It always uses xWrite() to write

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-08 Thread Max Vlasov
not expect this from client that uses vfs Max On Mon, Apr 8, 2013 at 1:56 PM, Dan Kennedy danielk1...@gmail.com wrote: On 04/08/2013 04:40 PM, Max Vlasov wrote: On Mon, Apr 8, 2013 at 1:23 PM, Dan Kennedy danielk1...@gmail.com wrote: Right. But a VFS is not obliged to support the new xFetch

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-08 Thread Max Vlasov
expects pointer to the data, the complexity of understanding will grow. Or is there a simple way to disable xFetch/xUnfetch on the VFS level? Max On Mon, Apr 8, 2013 at 3:33 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Apr 8, 2013 at 6:12 AM, Max Vlasov max.vla...@gmail.com wrote: But I

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-07 Thread Max Vlasov
On Thu, Apr 4, 2013 at 4:02 PM, Richard Hipp d...@sqlite.org wrote: By making use of memory-mapped I/O, the current trunk of SQLite (which will eventually become version 3.7.17 after much more refinement and testing) can be as much as twice as fast, on some platforms and under some workloads.

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-07 Thread Max Vlasov
don't know what's wrong with the link, I'm clicking the one from gmail thread and it works. Other way is to google [Unresponsive system under some file-mapping related conditions] and the first result is the thread link Max On Sun, Apr 7, 2013 at 2:25 PM, Jean-Christophe Deschamps

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-07 Thread Max Vlasov
On Sun, Apr 7, 2013 at 3:55 PM, Chris Smith smitt...@gmail.com wrote: Possibly related: http://en.wikipedia.org/wiki/Thrashing_(computer_science) That's an interesting direction. Surprisingly if one query ... site:microsoft.com Thrashing memory-mapped... on google, he or she would find a

Re: [sqlite] integrity_check out of memory

2013-01-23 Thread Max Vlasov
On Tue, Jan 22, 2013 at 12:33 PM, Dominique Pellé dominique.pe...@gmail.com wrote: Max Vlasov wrote: Hi, I found with the web search that this error (out of memory for PRAGMA integrity_check) appeared in the wild and there were some fixes related to it.It looks perhaps like the bug

Re: [sqlite] integrity_check out of memory

2013-01-22 Thread Max Vlasov
Thanks, Dominique I will try asap, but looking at the arithmetics 25 (The length of Page ? is never used) * 800 (maximum I could get) = 20,000 (limit mentioned in the ticket ) looks like this is a winner :) Max Hi Max It looks perhaps like the bug that was fixed in this checkin:

Re: [sqlite] integrity_check out of memory

2013-01-21 Thread Max Vlasov
On Mon, Jan 21, 2013 at 9:30 PM, Klaas V klaasva...@yahoo.com wrote: Max wrote he's using an encrypted VFS. Perhaps the problem disappears when he decodes the file? I tried to do the same for the decrypted file and on another computer, with much more memory. The same result. Probably I I can

[sqlite] integrity_check out of memory

2013-01-20 Thread Max Vlasov
Hi, I found with the web search that this error (out of memory for PRAGMA integrity_check) appeared in the wild and there were some fixes related to it. Today I decided to do the check for a base that lives with its own encrypted vfs and with an sqlite version older than the current. But the

[sqlite] sqlite 3.7.13 download link

2012-07-08 Thread Max Vlasov
Hi, Is everything ok with amalgamation link for sqlite 3.7.13? When I click on the link nothing happens, different browsers, local networks, the same result. Just in case for the TCP/IP request on 80 port www.sqlite.org /download.html/sqlite-amalgamation-3071300.zip The header is HTTP/1.0 200

Re: [sqlite] sqlite 3.7.13 download link

2012-07-08 Thread Max Vlasov
Ok, I see, the problem is I sometimes reach pages from web search. So the query [sqlite download] shows in the google www.sqlite.org/download.html/http://www.sqlite.org/download.html/sqlite-amalgamation-3071300.zip (with slash), it's identical to the one without slash, but every link at this page

[sqlite] free list performance

2012-04-23 Thread Max Vlasov
Hi, Some time ago I worked with a database repeating the same sequence of actions multiply times. They're basically: - create table - populate table - do some deletes with some criteria - drop table After about 20 times I started to notice the usual effects of internal fragmentation (slowness in

Re: [sqlite] free list performance

2012-04-23 Thread Max Vlasov
On Mon, Apr 23, 2012 at 3:35 PM, Simon Slavin slav...@bigfraud.org wrote: For the second one, the simplest way to do something like defragment the data inside the file is to use the VACUUM command: Simon, thanks, I see what vacuum can do, sure I use it frequently as many of us. Ironically

Re: [sqlite] Optimize Table Access Efficiency

2012-03-21 Thread Max Vlasov
On Wed, Mar 21, 2012 at 1:33 AM, Tim Morton t...@preservedwords.com wrote: So it seems the index is no help; Are you sure you did as Simon explained? Becausem my tests shows the trick works... (sqlite 3.7.10) Create table [TestTable] ([Id] integer primary key, [topics] Text, [Definition]

Re: [sqlite] Optimize Table Access Efficiency

2012-03-20 Thread Max Vlasov
Hi, Tim On Tue, Mar 20, 2012 at 6:21 PM, Tim Morton t...@preservedwords.com wrote: Is there a way to read only the part of the file that has the queried table/column thus saving time and hard dive grinding? There is also a trick. You can create an index on 'topics' column and perform your

[sqlite] The number of parameters passed to user functions

2012-03-13 Thread Max Vlasov
Hi, Is there a way to know the number of parameters passed for user function with undefined argument count (nArg = -1 in the Sqlite3_create_function call). I could not find a function specific to this task and thought that I at least can check sqlite3_values array members for zero for my

Re: [sqlite] The number of parameters passed to user functions

2012-03-13 Thread Max Vlasov
On Tue, Mar 13, 2012 at 3:16 PM, Jean-Christophe Deschamps j...@antichoc.net wrote: Why do you register the function with -1 in the first place? Register both 2- and 3-parms functions (if you have those two variations), both pointing to the same function code: argc is valid and let you decide

Re: [sqlite] A possible bug probably partially fixed before

2012-03-12 Thread Max Vlasov
On Fri, Mar 9, 2012 at 12:04 PM, Max Vlasov max.vla...@gmail.com wrote: So looks on the way from 3.6.10 to 3.7.10 something was really fixed related to this issue, but seems like not everything. Don't know whether this is serious or a problem at all, but I spent some time with such queries

[sqlite] A possible bug probably partially fixed before

2012-03-09 Thread Max Vlasov
Hi, I experimented with random numbers recently (with an older version of sqlite) and notice a strange behavior, I tried to reproduce this with the latest version and noticed that it was probably partially fixed, but still returns wrong results for my query. The simplest table possible CREATE

Re: [sqlite] A possible bug probably partially fixed before

2012-03-09 Thread Max Vlasov
On Fri, Mar 9, 2012 at 12:04 PM, Max Vlasov max.vla...@gmail.com wrote: 3.6.10 - ... actualrndid never gets higher than 900 (wrong) Sorry, correction, never gets lower than 900 Max ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Max Vlasov
On Tue, Mar 6, 2012 at 12:22 PM, Roger Binns rog...@rogerbinns.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/03/12 23:41, Max Vlasov wrote: One of the recent thought I had was implementing time machine vfs. So on the developer level he opens the db either in general mode

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Max Vlasov
On Tue, Mar 6, 2012 at 2:37 PM, Dan Kennedy danielk1...@gmail.com wrote: On 03/06/2012 02:41 PM, Max Vlasov wrote: But for correct work this vfs should rely on the fact that file change counter will stay the same until the final write to the first sector. Do you just want some hook

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Max Vlasov
On Tue, Mar 6, 2012 at 4:00 PM, Dan Kennedy danielk1...@gmail.com wrote: On 03/06/2012 06:45 PM, Max Vlasov wrote: It's an interesting suggestion, thanks. I just thought that using xSync I even can only implement my own db change counter. In any case the question is will it be called

Re: [sqlite] Once again about file change counter

2012-03-06 Thread Max Vlasov
On Tue, Mar 6, 2012 at 9:55 PM, Roger Binns rog...@rogerbinns.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/03/12 01:56, Max Vlasov wrote: I don't see a problem here. ... For example the user could use the app for 3 hours and perform what they consider to be 10 actions

[sqlite] Once again about file change counter

2012-03-05 Thread Max Vlasov
Hi, there are some ideas for vfs implementation that would require tracking file change counter. As I recall, I asked about specific api for working with file change counter, and seems like there was no such. On the other side it looks like it's not a problem since probably until db format change

Re: [sqlite] opening places.sqlite from Firefox (10.0.1) profile qAdmin Cannot perform on closed dataset

2012-02-11 Thread Max Vlasov
On Sat, Feb 11, 2012 at 1:56 PM, Christoph Kukulies k...@kukulies.orgwrote: I'm trying to open some Firefox files that are located in the profiles directory using Sqlite admin (http://sqliteadmin.orbmu2k.**de/ http://sqliteadmin.orbmu2k.de/). I'm getting an error message: Cannot perform

[sqlite] Phrase in the docs

2012-02-10 Thread Max Vlasov
Hi, working with sqlite and mysql, noticed that they're different in regard of mixed types. Select '24' 25 Select 24 25 have the same results in MySql and different sqlite. Actually it's no news (my sqlite queries contained CAST(.. as INT) ), but I decided to look at the docs and noticed

Re: [sqlite] Phrase in the docs

2012-02-10 Thread Max Vlasov
On Fri, Feb 10, 2012 at 4:53 PM, Richard Hipp d...@sqlite.org wrote: On Fri, Feb 10, 2012 at 6:11 AM, Max Vlasov max.vla...@gmail.com wrote: Hi, working with sqlite and mysql, noticed that they're different in regard of mixed types. Select '24' 25 Select 24 25 have the same

Re: [sqlite] Phrase in the docs

2012-02-10 Thread Max Vlasov
On Fri, Feb 10, 2012 at 5:45 PM, Igor Tandetnik itandet...@mvps.org wrote: Value has TEXT affinity, 5 has none. So 5 is converted to '5', and then lexicographic comparisons are performed. It so happens that all strings in the Value column lexicographically precede '5'. If you wanted Value to

Re: [sqlite] Inserts get slower and slower

2012-02-08 Thread Max Vlasov
On Thu, Feb 9, 2012 at 2:08 AM, Steinar Midtskogen stei...@latinitas.orgwrote: When I build my database from scratch using millions of inserts, one table causes problems. Inserts get slower and slower. I have about 830,000 inserts for that table. It gets to 300,000 pretty fast, but then

Re: [sqlite] About new ticket Per page/region checksums

2012-02-07 Thread Max Vlasov
On Sat, Feb 4, 2012 at 3:51 PM, Alexey Pechnikov pechni...@mobigroup.ruwrote: It's very important but there are some questions about http://www.sqlite.org/src/info/72b01a982a Some times ago DRH wrote that checksum calculation don't slow down SQLite significantly. But can be this realized in

[sqlite] List of DB virtual modules

2012-01-23 Thread Max Vlasov
Hi, it there an easy way (without manual statements parsing) to get the list of modules used in all (if any) virtual tables statements of the schema? For any opened db I wanted to automatically enable found modules (if I recognize them) and warn if there are unsupported ones. Thanks, Max

Re: [sqlite] List of DB virtual modules

2012-01-23 Thread Max Vlasov
On Mon, Jan 23, 2012 at 5:36 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Jan 23, 2012 at 8:06 AM, Max Vlasov max.vla...@gmail.com wrote: it there an easy way (without manual statements parsing) to get the list of modules used in all (if any) virtual tables statements of the schema

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-20 Thread Max Vlasov
On Fri, Jan 20, 2012 at 10:05 PM, John Elrick john.elr...@fenestra.comwrote: The change which results in a slow down occurred between 3.7.5.0 and 3.7.6.0. What about EXPLAIN difference? Or just outputs of this prefix from both versions? Max ___

Re: [sqlite] Collecting return values from sql commands using SQLite APIs.

2012-01-19 Thread Max Vlasov
On Thu, Jan 19, 2012 at 1:49 PM, bhaskarReddy uni...@gmail.com wrote: Hi Friends, is it possible to collect return value of a SQL command. ex: SELECT COUNT(*) FROM table; will return number of records in a table. Is there any SQLite API to return this value. It's the same api

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Max Vlasov
John, another suggestion Can you test previous sqlite versions one by one towards older ones with one of your problem queries until the results are good again and send both good and bad EXPLAIN QUERY output here. I'm sure this will be greek for most of us :), but when Richard or Dan look at the

Re: [sqlite] msize in 3.7.10

2012-01-18 Thread Max Vlasov
On Tue, Jan 17, 2012 at 6:11 PM, Max Vlasov max.vla...@gmail.com wrote: Hi, I'm using static linking with Delphi and a new function required binding in 3.7.10 - msize (__msize). The problem here is that there's no official way to query the size of a memory block in Delphi memory manager

Re: [sqlite] msize in 3.7.10

2012-01-18 Thread Max Vlasov
On Wed, Jan 18, 2012 at 4:47 PM, Richard Hipp d...@sqlite.org wrote: Try using the trunk of the SQLite source tree with the SQLITE_WITHOUT_MSIZE preprocessor macro. Richard, thank, I will try, but I just tried to replace #if !defined(HAVE_MALLOC_USABLE_SIZE) SQLITE_OS_WIN # define

Re: [sqlite] msize in 3.7.10

2012-01-18 Thread Max Vlasov
On Wed, Jan 18, 2012 at 4:47 PM, Richard Hipp d...@sqlite.org wrote: On Tue, Jan 17, 2012 at 9:11 AM, Max Vlasov max.vla...@gmail.com wrote: Hi, I'm using static linking with Delphi and a new function required binding in 3.7.10 - msize (__msize). ... Try using the trunk of the SQLite

[sqlite] msize in 3.7.10

2012-01-17 Thread Max Vlasov
Hi, I'm using static linking with Delphi and a new function required binding in 3.7.10 - msize (__msize). The problem here is that there's no official way to query the size of a memory block in Delphi memory manager, at least I'm not aware of one. Should I solve this anyway (for example by keeping

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Sun, Jan 15, 2012 at 3:35 AM, John Elrick john.elr...@fenestra.comwrote: On Fri, Jan 13, 2012 at 5:13 PM, Max Vlasov max.vla...@gmail.com wrote: 5,008 calls to UPDATE RESPONSES SET RESPONSE_NAME = :RESPONSE_NAME, prelisted_value = :prelisted_value WHERE RESPONSE_OID = :RESPONSE_OID

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Mon, Jan 16, 2012 at 5:37 PM, John Elrick john.elr...@fenestra.comwrote: is this test ok for you (still showing bad performance)? On my side it's about 800 ms for 3.7.9 static and about 6000 memory calls during the query. For 3.6.20 the number of calls ~ 7000, the time is similar.

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Tue, Jan 17, 2012 at 5:05 AM, John Elrick john.elr...@fenestra.comwrote: I can try that approach with BCC. I was concerned that the IDE would be getting inaccurate information from the .OBJ. Crossing into a pre-complied library can be tricky. As I recall,I could not make debug

  1   2   3   4   >