Re: [sqlite] Cause of "disk I/O errors"

2011-01-30 Thread Max Vlasov
On Mon, Jan 31, 2011 at 4:25 AM, GHCS Software wrote: > > So it seems it must be something about their particular machine > environment, but what? I'm sure that nobody is running out of disk space > these days. Any ideas on where to look or what to suggest to them that > they can do? > > Maybe ant

Re: [sqlite] Boost copy from one table to another ?

2011-01-28 Thread Max Vlasov
On Fri, Jan 28, 2011 at 11:38 AM, Pierre Chatelier wrote: > > But I wondered if I could improve the performance with the following scheme > : > my disk DB is B > I create a memory DB, with the same structure, named A > I attach B to A > then in a a loop >I insert the rows in A >When A is b

Re: [sqlite] How can we use POWER(2,32) like function in SQLite

2011-01-20 Thread Max Vlasov
On Thu, Jan 20, 2011 at 8:23 AM, Sunil Bhardwaj < sbhard...@ipolicynetworks.com> wrote: > Hi > > Please suggest, How can we use POWER(2,32) like function in SQLite? > > This particular call or any with base 2 can be replaced with bitwise shift SELECT 1 << 32 Max

Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Max Vlasov
place to know sqlite file format), i.e. there's a known last actions about writing some fields when the transaction ends. When xWrite filter detects this special write, it writes EndOfTransaction record to the log. The following undo operations limits restoring only to those states when this speci

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-14 Thread Max Vlasov
On Fri, Jan 14, 2011 at 1:57 PM, Philip Graham Willoughby < phil.willoug...@strawberrycat.com> wrote: > > On 14 Jan 2011, at 10:45, Max Vlasov wrote: > > > Phil, it's an interesting solution. I will probably use it, but the > current > > problem is that I have

Re: [sqlite] how to put the database in cache without waiting the system do it by himself ?

2011-01-14 Thread Max Vlasov
*) FROM (your select here)" and execute it when the program starts. In this case you don't have to save this temporary result (it's a single row and single column) and the system and sqlite will read the same parts of the file that will be needed later. Max Vlasov

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-14 Thread Max Vlasov
On Fri, Jan 14, 2011 at 1:20 PM, Philip Graham Willoughby < phil.willoug...@strawberrycat.com> wrote: > On 13 Jan 2011, at 17:27, Nicolas Williams wrote: > > > On Thu, Jan 13, 2011 at 10:59:29AM +, Simon Slavin wrote: > >> His problem is that he doesn't know which rows are aliased to rowid, >

Re: [sqlite] Committing to a savepoint

2011-01-14 Thread Max Vlasov
will allow several steps undo. There are some challenges, for example to allow arbitrary undo operations we should also log transaction boundaries since undoing to some points in between not only makes little sense, but also dangerous. But I think if implemented with those challenges solved, such

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 2:32 PM, Simon Davies wrote: > On 13 January 2011 10:56, Max Vlasov wrote: > > On Thu, Jan 13, 2011 at 1:48 PM, Simon Davies > > wrote: > > > >> On 13 January 2011 10:28, Max Vlasov wrote: > >> > >> CREATE TEMP TRIGGER [U

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 1:59 PM, Simon Slavin wrote: > > On 13 Jan 2011, at 10:48am, Simon Davies wrote: > > > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE OF RowId, Id ON > TestTable > > BEGIN > > UPDATE UpdatedRowId Set Value = new.rowid; > > END; > > His problem is that he doesn't k

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 1:48 PM, Simon Davies wrote: > On 13 January 2011 10:28, Max Vlasov wrote: > > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE OF RowId, Id ON > TestTable > BEGIN > UPDATE UpdatedRowId Set Value = new.rowid; > END; > > Simon, this p

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 12:46 PM, Simon Slavin wrote: > > On 13 Jan 2011, at 8:53am, Dan Kennedy wrote: > > > On 01/13/2011 02:31 AM, Max Vlasov wrote: > >> Hi, > >> for queries like UPDATE ... WHERE rowid=... one can in most cases reread > the > >

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-12 Thread Max Vlasov
On Thu, Jan 13, 2011 at 2:28 AM, Simon Slavin wrote: > > On 12 Jan 2011, at 10:54pm, Max Vlasov wrote: > > > On Thu, Jan 13, 2011 at 1:07 AM, Simon Slavin > wrote: > > > >> [snip] If you're just > >> letting your user change whatever data they want

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-12 Thread Max Vlasov
On Thu, Jan 13, 2011 at 1:07 AM, Simon Slavin wrote: > > On 12 Jan 2011, at 9:57pm, Max Vlasov wrote: > > > Simon, your reply led me to the following sequence: > > - I know the rowid of the record I'm changing. I remember all integers > (and > > all other data

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-12 Thread Max Vlasov
On Thu, Jan 13, 2011 at 12:21 AM, Simon Slavin wrote: > > On 12 Jan 2011, at 9:02pm, Max Vlasov wrote: > > > It's about the utility, when the data is presented with a grid and every > > cell of opened db and * fields of table can be edited.. I'm aware that

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-12 Thread Max Vlasov
On Wed, Jan 12, 2011 at 11:35 PM, Simon Slavin wrote: > If you're writing an arbitrary SQL utility, I think the answer depends on > why you want to keep track of a particular record. You either want to > refresh the display or you don't, and either way the connection between old > and new rowids

[sqlite] How to track a record if the aliased id is changed

2011-01-12 Thread Max Vlasov
k the aliased fields but there's at least one exception in the docs... Any thoughts? Thanks, Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] 3.7.4 possible restore bug

2011-01-12 Thread Max Vlasov
On Wed, Jan 12, 2011 at 3:48 PM, Richard Hipp wrote: > On Wed, Jan 12, 2011 at 5:27 AM, Max Vlasov wrote: > > > On Thu, Dec 23, 2010 at 3:10 PM, Max Vlasov > wrote: > > > > > Hi, > > > I experimented with artificial power loss (using hd box) and 3.

Re: [sqlite] 3.7.4 possible restore bug

2011-01-12 Thread Max Vlasov
On Thu, Dec 23, 2010 at 3:10 PM, Max Vlasov wrote: > Hi, > I experimented with artificial power loss (using hd box) and 3.7.4 both > library and shell didn't restore the files to the initial state. 3.6.10 > restores successfully. > This is a kind of repost, there wasn

Re: [sqlite] Propose minor incompatible API change

2011-01-11 Thread Max Vlasov
s bad, the problem is that "minor change syndrome" will never die and life teaches me this again and again :) Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] More descriptive error

2011-01-09 Thread Max Vlasov
te3_reset(). Occasionally I had to fix this in order for user functions to supply error strings (without this it's just simple default error). I checked two recent versions of my admin with this fix and without and they supply exactly two different errors as you described Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Corrupted database file.

2011-01-06 Thread Max Vlasov
oft Memory Diagnostics that is actually iso image that can be burned as a boot cd-rom. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Corrupted database file.

2011-01-06 Thread Max Vlasov
You can compare your case with this information and maybe find the cause Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Corrupted database file.

2011-01-06 Thread Max Vlasov
ntergrity_check; command on your corrupted db. I suppose there should be some about indexes. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] clear cache for performance measure

2010-12-30 Thread Max Vlasov
On Thu, Dec 30, 2010 at 9:14 AM, Simon Slavin wrote: > > On 30 Dec 2010, at 5:16am, Max Vlasov wrote: > > > On Thu, Dec 30, 2010 at 3:23 AM, KimTaein wrote: > > > >> Thanks Simon but that PRAGMA did not work > >> > >> Eric: I am on Wind

Re: [sqlite] clear cache for performance measure

2010-12-29 Thread Max Vlasov
ag in sqlite would be too platform-specific so in my admin I did a checking menu that forces the admin to "touch" the file with brief file opening with this flag before open (reopen), works flawlessly and helped me to compare many queries just like in your task Max Vlasov

Re: [sqlite] Rollback transaction if error

2010-12-27 Thread Max Vlasov
On Tue, Dec 28, 2010 at 5:37 AM, BareFeetWare wrote: > . I want the SQL to take care of the commit/rollback decision so I can just > give SQLite a transaction block that will work as a whole or else just > rollback and have no effect. Then I can send that SQL transaction block via > whatever SQLit

Re: [sqlite] Searchtime in SQL

2010-12-26 Thread Max Vlasov
rch becomes slower and slower. With full-text search you have to do something very special to make it really slow. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] VFS and hot journals

2010-12-24 Thread Max Vlasov
Hi, I recently discovered that for vfs implemented writable formats that actually change the data of the sqlite base (encryption, compression), there should be a complex logic behind the restoration from the hot journal, at least some versions ago. For correct password handling initially I relied

Re: [sqlite] 3.7.4 possible restore bug

2010-12-23 Thread Max Vlasov
On Thu, Dec 23, 2010 at 3:10 PM, Max Vlasov wrote: > Hi, > I experimented with artificial power loss (using hd box) and 3.7.4 both > library and shell didn't restore the files to the initial state. 3.6.10 > restores successfully. I don't know whether it's related the

[sqlite] 3.7.4 possible restore bug

2010-12-23 Thread Max Vlasov
t.net/downloads/dbwithjournal.zip The steps to reproduce: unzip both files anywhere, open the db in sqlite shell (3.7.4), do the .quit and both the db and journal are still there. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.o

Re: [sqlite] Rollback transaction if error

2010-12-22 Thread Max Vlasov
optionally (or do it anyway with a error being not error). Anyway, I think that getting rid of transaction commands make you queries more portable since you will be able to concatenate them before wrapping into begin/end Max Vlasov ___ sqlite-users mailin

Re: [sqlite] SQLite and Windows 95

2010-12-21 Thread Max Vlasov
98. I'm not sure about 95, but at least you can try. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite server

2010-12-21 Thread Max Vlasov
On Tue, Dec 21, 2010 at 4:44 PM, Philip Graham Willoughby < phil.willoug...@strawberrycat.com> wrote: > On 21 Dec 2010, at 12:16, Max Vlasov wrote: > > > Simon, I read both your suggestion and the Richard's good explanation > about > > network problems. I think

Re: [sqlite] SQLite server

2010-12-21 Thread Max Vlasov
ward way to implement this with conventional client/server dbms. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite and Windows 95

2010-12-20 Thread Max Vlasov
his function in the SQLite code, the same problem appears with > another function. > > Looking at the name of the function that ends with W, the questions is: have you installed Microsoft Layer for Unicode ( http://msdn.microsoft.com/en-us/gogloba

Re: [sqlite] Windows performance problems associated with malloc()

2010-12-20 Thread Max Vlasov
, mem requests: 10157 44 ms. SELECT count(docid) FROM WikiFTS3 where Abstract Match '"of the previous"' Result: 403, mem requests: 1,627,732 3400 ms I don't know what it means, maybe that some optimization might be pos

Re: [sqlite] Windows performance problems associated with malloc()

2010-12-18 Thread Max Vlasov
ore memory (for example when resolving 'and' or phrase search) Just curious. I'm not so familiar with sqlite internals. Can someone mention some other cases when sqlite really needs to allocate memory frequently in order to affect the overall performance? Max Vlasov

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
red after the open? I suggested name analizing prior to optn (searching for -journal file), but what about wal mode? is there any visual indication that the job was stopped during the checkpointing? Max Vlasov ___ sqlite-users mailing list sqlite-user

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
d not interrupt the query while any other general query can be interrupted with progress callbacks. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] assert crash in wal

2010-12-15 Thread Max Vlasov
re, memory usage can increase in this case, but if one compares footprints of modern libraries, frameworks and so on with sqlite, even with several connections sqlite is still the winner Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org ht

Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Max Vlasov
On Sat, Dec 11, 2010 at 1:52 AM, Vander Clock Stephane < svandercl...@yahoo.fr> wrote: > yes, i agree except that the file fragmentation of the file database > cause also the file fragmentation of some other files... that is logique > when more than 2 file grow a little at a time ! and the other f

Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Max Vlasov
om/sqlite-users@sqlite.org/msg56083.html (I gave a linke to my post since root message doesn't contain the full discussion for some reasons). So, VACUUM from time to time is better overall than Os defrag (imho) Max Vlasov ___ sqlite-users mailing list s

Re: [sqlite] enums

2010-12-08 Thread Max Vlasov
ot that easy to modify all existing queries at once. Find_in_set is good in this way since the comma-separated list can be stored as an element in a settings table. As I recall I implemented a reverse function to find_in_set, but had to come up with a name since did not find the corresponding function in mysql. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Concern over runtime memory growth?

2010-12-07 Thread Max Vlasov
of the application grow and grow. > Lynton , please report your OS and sqlite version Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] enums

2010-12-07 Thread Max Vlasov
On Tue, Dec 7, 2010 at 8:38 PM, john darnell wrote: > Is there any way to build an SQLite table that recognizes enums? > Hmm, I always thought that this is better to be implemented by a separate table and lookup join. Can you name a reason to do this internally by sqlite? Max

Re: [sqlite] database size (again)

2010-12-07 Thread Max Vlasov
o map it in your reading/writing code to save space for floats. In worst case every 8 bytes float will be 4(5)-byte integer (5 possible due to the internal packed format of sqlite), so maybe you will save 10-15 bytes per record (I added also indexes) Max Vlasov

Re: [sqlite] SQLite Documentation

2010-12-04 Thread Max Vlasov
On Sat, Dec 4, 2010 at 11:51 AM, Dagdamor wrote: > Hello. > > Would you like to have a downloadable version of the SQLite Documentation? > I've created one in Windows HTML Help (.chm) format. It seems to be useful, > single-file (no need to zip/unzip it), compact and easy to navigate/search. > I'

[sqlite] User function instead of custom tokenizer

2010-12-03 Thread Max Vlasov
function). Just wondering, apart from some performance degradation working with temporary buffer, are there other disadvantages of using such approach? Thanks, Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] Confused about Multiple Indexes

2010-11-26 Thread Max Vlasov
On Fri, Nov 26, 2010 at 1:34 PM, Swithun Crowe < swit...@swithun.servebeer.com> wrote: > Hello > > MS> The second index should be: > MS> CREATE INDEX IDX2 on tx(type, name ASC); > > MS> What I had meant to ask was whether there is any benefit in having two > MS> indexes when one of the indexes is

Re: [sqlite] sqlite3_open on non-DB files / corrupt DBs

2010-11-25 Thread Max Vlasov
eading this pragma returned an error about something like "encrypted or bad" Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reducing time to create indexes

2010-11-25 Thread Max Vlasov
0MB and many modern software/hardware configurations will possibly read it just once accessing this data from the cache when your second and later indexes are created. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Does sqlite uses xAccess to check the main db existence?

2010-11-24 Thread Max Vlasov
On Wed, Nov 24, 2010 at 6:01 PM, Richard Hipp wrote: > On Wed, Nov 24, 2010 at 6:15 AM, Max Vlasov wrote: > > > Hi, > > > > I'm trying to implement read-only access to sqlite database saved in the > > Windows RC_DATA resouce (of the same exe file). There

[sqlite] Does sqlite uses xAccess to check the main db existence?

2010-11-24 Thread Max Vlasov
lead to "unable to open" error). But also the debugging shows that xAccess never checks for the main file existence, only supplemental ones. Can I rely on that and return FALSE unconditionally? Currently it works, but it might give a new failure in the future. Tha

Re: [sqlite] sqlite3_get_table() vs sqlite3_step

2010-11-21 Thread Max Vlasov
27;t an issue, > why not use sqlite3_get_table()? Why is its usage being discouraged? > > > Tito, looking at the sources... sqlite3_get_table seems to be sqlite3_exec call with a callback and sqlite3_exec is sqlite3_prepare/sqlite3_step wrapper. So, probably no special access

Re: [sqlite] page cache vs OS cache

2010-11-20 Thread Max Vlasov
ache for this particular file. If it's implemented in sqlite, this will give the developer the way to rely fully on the sqlite cache and save some resources. Max Vlasov, maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Idea for one of the testing suites

2010-11-08 Thread Max Vlasov
timings for one version and another. if the difference is significant, then stop, otherwise go further. Max Vlasov ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sqlite3_progress_handler and automatic rollback

2010-11-01 Thread Max Vlasov
On Thu, Oct 28, 2010 at 2:03 PM, Max Vlasov wrote: > > The problem is that (tested with 3.6.10 and 3.7.2) if : > - I interrupt a query from Sqlite3_progress_handler > - I didn't invoke this error-processing rollback, > > ...sqlite after that does the following: > - sql

[sqlite] Sqlite3_progress_handler and automatic rollback

2010-10-28 Thread Max Vlasov
error (not so widely spread "Sqlite logic or missing...") in order to detect this special case in my code Thanks, Max Vlasov maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Changing Date Format

2010-10-26 Thread Max Vlasov
On Wed, Oct 27, 2010 at 8:09 AM, jose isaias cabrera wrote: > > What I would like to do is a call that can fix the dates to the correct > format, ie. -MM-DD, so that the final data looks like this, > > How about UPDATE Table1 Set d1=Replace(Replace(d1, "-", "

Re: [sqlite] WAL file growth concern

2010-10-23 Thread Max Vlasov
T Count(Null) FROM TestTable, TestTable if this query is long enough (5 seconds and more) we will see -wal file growing steadily until client 2 finishes. In my tests I con confirm growing to 8M, 23M Max Vlasov maxerist.net ___ sqlite-users mailing list sq

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Max Vlasov
On Sat, Oct 23, 2010 at 2:28 AM, Dustin Sallings wrote: > > On Oct 22, 2010, at 15:12, Max Vlasov wrote: > > > As for your initial question, I think fragmentation evaluation is > possible > > with the help of VFS. I'd keep a total sum of of absolute difference

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Max Vlasov
k to the tests, can someone perfom similar tests on linux? I heard it have a different cache system, i wonder whether it can show better performance in this artificial tests. Thanks in advance Max Vlasov maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Full text search FTS3 of files

2010-10-17 Thread Max Vlasov
the same pool of articles. So there's a real chance that even if you implement something that doesn't store the texts, you will end up with a bigger index Max Vlasov maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Comma-delimited field to rows (Once again)

2010-10-15 Thread Max Vlasov
On Sat, Oct 16, 2010 at 2:47 AM, Jim Morris wrote: > Not much help but this removes the multiplication: > SELECT B1.B + B2.B + B3.B + B4.B FROM > (SELECT 0 AS B UNION SELECT 1 AS B) AS B1, > (SELECT 0 AS B UNION SELECT 2 AS B) AS B2, > (SELECT 0 AS B UNION SELECT 4 AS B) AS B3, > (SELECT 0 AS B

[sqlite] Comma-delimited field to rows (Once again)

2010-10-15 Thread Max Vlasov
Hi, from time to time I try to solve well-known task of making rows from a comma-delimited list and the best I could do was this: - create a user-function returning zero-based Nth item from the list (let's call it GetItemFromSet) - make a complex query like this (this one allows up to 16 elements i

Re: [sqlite] How can I build the FTS3 extension as a Windows DLL?

2010-10-13 Thread Max Vlasov
On Thu, Oct 14, 2010 at 1:04 AM, Nate Silva wrote: > (Although FTS can be compiled into SQLite, I would like a DLL so I can > dynamically load the extension into environments where I have a pre-compiled > SQLite that doesn’t have full text search.) > > Nate, I think compile-time errors in this ca

Re: [sqlite] Create Read-only Database

2010-10-11 Thread Max Vlasov
On Sun, Oct 10, 2010 at 11:04 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/10/2010 11:53 AM, Max Vlasov wrote: > > Also if you're not content with this option, you can always open the file > > (just as a general file) prior

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Max Vlasov
;m sure a similar option should exist in Linux. In this case any attempt to write will lead to OS-level error that finally will be passes as some sqlite error to your code. Max Vlasov maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Speed up DELETE of a lot of records

2010-10-08 Thread Max Vlasov
On Thu, Oct 7, 2010 at 8:05 PM, Michele Pradella wrote: > Hi all, I have a question about how to speed up a DELETE statement. > I have a DB of about 3GB: the DB has about 23 millions of records. > The DB is indexed by a DateTime column (is a 64 bit integer), and > suppose you want to delete all

Re: [sqlite] [BUG] JOIN subquery in FROM with FTS3 table

2010-10-07 Thread Max Vlasov
On Thu, Oct 7, 2010 at 4:05 PM, Richard Hipp wrote: > On Thu, Oct 7, 2010 at 8:00 AM, Dan Kennedy wrote: > > > > > > > It seems that something changed in the query optimizer. > > > > Thanks for the report. We think this has been fixed in > > fossil already. 3.7.3 should be the same as 3.6.23 for

Re: [sqlite] [BUG] JOIN subquery in FROM with FTS3 table

2010-10-07 Thread Max Vlasov
On Thu, Oct 7, 2010 at 2:50 PM, Shopsland gmail wrote: > Hi, > > Given this simple query with a subquery in FROM and a join with a FTS3 > table: > > SELECT news1.number, fts_news.title > FROM (SELECT number FROM news LIMIT 50) as news1, fts_news > WHERE news1.number=fts_news.docid > > The query r

Re: [sqlite] unable to open database file/Disc I/O error

2010-10-07 Thread Max Vlasov
On Thu, Oct 7, 2010 at 1:03 PM, Serena Lien wrote: > > If you find any vista OS patches that solve this problem, please let > me know, we are looking ourselves in the hopes that microsoft has > resolved this issue.. > > Serena, How about this patch : http://support.microsoft.com/kb/935366/en-us(

Re: [sqlite] Delete from A what is not in B

2010-10-04 Thread Max Vlasov
On Sat, Oct 2, 2010 at 4:02 PM, Igor Tandetnik wrote: > Fadhel Al-Hashim wrote: > > I have two tables that contain about 5 million records. I am trying to > write > > an SQL command to delete rows from table A with PK (x,y,z) where PK > (x,y,z) > > is not in table B. > > > delete from A where ro

Re: [sqlite] SQLite working with C++'s iostream

2010-10-04 Thread Max Vlasov
ner size and after the extensive usage of a VFS-filtered query, the first sql query that actually touched xTruncate was VACUUM. Max Vlasov maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Massive performance regression in 3.7.x

2010-09-25 Thread Max Vlasov
On Sat, Sep 25, 2010 at 10:34 PM, Richard Hipp wrote: > On Sat, Sep 25, 2010 at 10:54 AM, Max Vlasov wrote: > > > On Sat, Sep 25, 2010 at 6:35 PM, Richard Hipp wrote: > > > > > > > > You have a very unusual data distribution in your tables. SQLite do

Re: [sqlite] Massive performance regression in 3.7.x

2010-09-25 Thread Max Vlasov
On Sat, Sep 25, 2010 at 6:35 PM, Richard Hipp wrote: > > You have a very unusual data distribution in your tables. SQLite does not > know this and so it chooses a query plan (in 3.7.1 and later) that assumes > a > different and more typical data distribution. The new query plan works > better f

Re: [sqlite] Performance problems and large memory size

2010-09-22 Thread Max Vlasov
1024 for everything except Windows. The Windows filesystem module > attempts to match the page size to the minimum write block of the > filesystem. For a typical NTFS volume, that's usually 4K. > > Jay, small correction, the default page_size on windows is still 1024 (checked it), there's jus

Re: [sqlite] Strange cache behavior

2010-09-22 Thread Max Vlasov
On Wed, Sep 22, 2010 at 7:12 PM, Pavel Ivanov wrote: > > Is it ok for cache to behave like this or some optimization is possible > to > > fix this? > > For this particular case I believe you can do some optimization by > making your own implementation of cache. > Also I believe such "strange" beh

[sqlite] Strange cache behavior

2010-09-22 Thread Max Vlasov
Hi, playing with my admin about cache size (there was a question today related to the cache size), noticed a strange thing with cache. It's Windows, initially it was v3.6.10, but the same is for 3.7.2 I sometimes mentioned that I can track vfs requests for every select in my admin. In this case i

Re: [sqlite] grouping inserts vs. one large tranaction

2010-09-19 Thread Max Vlasov
On Sun, Sep 19, 2010 at 8:18 PM, Erik Fears wrote: > This helps with the locking issues. > > I believe the slowness was actually related to the index on the 'name' > column. > This is a price you have to pay. The fastest scenario is when you don't have an index on a table and sequentially add ne

Re: [sqlite] VACUUM can actually increase the DB file?

2010-09-18 Thread Max Vlasov
> just a few minutes ago I ran a VACUUM on a DB file and the size before > was 2089610240 and afterwards 2135066624. Is this normal? > > If you have a copy of the old db and new db, can you check the results on both databases of the following pragmas: PRAGMA freelist_count; PRAGMA integrity_check;

Re: [sqlite] returning smaller subset of columns: index vs trigger

2010-09-11 Thread Max Vlasov
On Sun, Sep 12, 2010 at 2:15 AM, Stephen Oberholtzer < oliverkloz...@gmail.com> wrote: > > Stephen, are you telling that is' smaller in any situation? When I > mentioned > > the trigger in case of fast reading of rowid/id, I thought that in this > case > > there can be a separated table with sing

Re: [sqlite] is there a program that converts sqlite database from windows-1252 to utf-8 ?

2010-09-11 Thread Max Vlasov
> > is there a program that converts sqlite database from windows-1252 to utf-8 > ? > It the base is not big, I think you can dump the db to sql file with the sqlite shell, convert this text file to UTF-8 (even with notepad) and feed it to new db Max __

Re: [sqlite] reading directly from indices (was: returning smaller subset of columns: index vs trigger)

2010-09-11 Thread Max Vlasov
On Sat, Sep 11, 2010 at 10:26 PM, Drake Wilson wrote: > Quoth Max Vlasov , on 2010-09-11 22:16:14 +0400: > > although index at least should not be worse in any situation > > I wouldn't be quite so sure. Would there not be use cases in which > different sets of columns

Re: [sqlite] returning smaller subset of columns: index vs trigger

2010-09-11 Thread Max Vlasov
On Sat, Sep 11, 2010 at 8:38 PM, Stephen Oberholtzer < oliverkloz...@gmail.com> wrote: > 2. They contain only a subset of the columns in the main table, so > they are smaller -- so reading through the entire index is faster than > reading through the entire table. > > Stephen, are you telling that

Re: [sqlite] returning smaller subset of columns: index vs trigger

2010-09-11 Thread Max Vlasov
On Sat, Sep 11, 2010 at 8:54 PM, Simon Slavin wrote: > > On 11 Sep 2010, at 5:38pm, Stephen Oberholtzer wrote: > > > It would be an interesting attempt to try efficiently patching SQLite > > to recognize this situation and read data directly out of the index. > > But I've been told many times tha

Re: [sqlite] returning smaller subset of columns: index vs trigger

2010-09-11 Thread Max Vlasov
On Sat, Sep 11, 2010 at 2:05 PM, Cory Nelson wrote: > On Sat, Sep 11, 2010 at 12:36 AM, Max Vlasov wrote: > > Hi, > > > > What other observations can be made about these two types of solutions > that > > I may face in the future? > > Both are commonly used

[sqlite] returning smaller subset of columns: index vs trigger

2010-09-11 Thread Max Vlasov
Hi, sometimes it is necessary to return only part of columns (maybe even only id/rowid) and sure SELECT Col1, Col2 works. But as the real tests some time ago showed, sqlite actually reads all the data from db (sure with an exception if record is bigger than a page). One of the approaches to optimi

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Max Vlasov
On Fri, Sep 10, 2010 at 6:32 PM, Shane Harrelson wrote: > I tried to reproduce this, and could not. > > There are some questions inline below.Additionally, I want to > verify that you've tried this with a version of SQLite containing the > previously linked fix. > > Shane, the fix helped, the

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Max Vlasov
On Fri, Sep 10, 2010 at 5:07 PM, Michele Pradella < michele.prade...@selea.com> wrote: > > what I worry about is that the Addressed space of > sqlite (during an operation of DELETE or UPDATE a lot of data in WAL > mode use case described before) could grow up till 2GB. This cause the > application

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Max Vlasov
On Fri, Sep 10, 2010 at 3:52 PM, Michele Pradella < michele.prade...@selea.com> wrote: > After some tests, with the new sqlite3.c source, seams that the > behavior is better than before. So I see the -shm and -wal file grow up, > and in VMMap I can see the Mapped File of -shm growing up, but not

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Max Vlasov
On Fri, Sep 10, 2010 at 12:53 PM, Dan Kennedy wrote: > > The bug is fixed by Shane's patch linked earlier in the thread. With > the patch, an 11MB -shm file is mapped into memory in around 350 chunks > with an average size of 48KB. Total address space used is around > (350*48KB). > Instead of the

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Max Vlasov
On Fri, Sep 10, 2010 at 11:29 AM, Michele Pradella < michele.prade...@selea.com> wrote: > I forgot to tell you something: in my situation the -shm file is > always small in size (about 6-7MB) even when I got 2GB of Virtual Bytes. > But it seams that is mapped too much times. > I see something tha

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-09 Thread Max Vlasov
> But as a side effect I got not expected result in other area, when I tried > to append 1,500,000 records to this 1.7G file having 5G of free space on the > disk, I got the error a user reported recently about win7 64bit, "Disk I/O > error". (http://www.mail-archive.com/sqlite-users@sqlite.org/msg

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-09 Thread Max Vlasov
On Thu, Sep 9, 2010 at 7:16 PM, Dan Kennedy wrote: > > > > > Dan, don't know whether it is related, but I detected memory leak in > > 3.7.2 > > related to handle count increasing. > > I think there will be one open handle for each 32KB of > shared-memory space in use. Or put another way, one open

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-09 Thread Max Vlasov
On Thu, Sep 9, 2010 at 11:37 AM, Dan Kennedy wrote: > > On Sep 9, 2010, at 1:12 PM, Michele Pradella wrote: > > > Hi, do you have some news about the wasted memory? have you found the > > reason for the windows backend? > > Fixed here: > > http://www.sqlite.org/src/ci/f213e133f6 > > Dan, don'

Re: [sqlite] Detecting storage class from C

2010-09-08 Thread Max Vlasov
On Thu, Sep 9, 2010 at 1:01 AM, Andrew Wood wrote: > Because I'm writing glue code between the SQLite API and a higher level > library which provides a standard API across several DBMSs. > > Have in mind that storage class is not a 'type', it's more like an effective way to store values compactly

Re: [sqlite] Trigger Questions

2010-09-02 Thread Max Vlasov
On Fri, Sep 3, 2010 at 12:29 AM, Igor Tandetnik wrote: > > The correct syntax is > > > > UPDATE sites SET createTime = DATETIME('NOW'), updateTime = > > DATETIME('NOW') > > WHERE rowid = new.rowid; > > > It's interesting, I once did a similar error with UPDATE (typing field1=.. and field2=... in

Re: [sqlite] upstreaming Chromium patches for file handle passing support

2010-09-01 Thread Max Vlasov
> I wonder whether it would be possible to extend the VFS in a way that would > make our use case possible (transferring a file handle over process > boundary). Please note that we do it on all platforms. On POSIX we pass an > integer file descriptor, and on Windows we pass a HANDLE. > > I used vfs

<    1   2   3   4   5   >