[sqlite] ATTACH DATABASE statement speed

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 2:48am, Simon Slavin wrote: > My suspicion here is that there's a design fault in ZFS. To correct myself here, what I meant to write was that there was a fault in the implementation of ZFS that Paolo is using, not in the basic design of ZFS itself. Simon.

[sqlite] Wierd Locking problem

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 3:03pm, Luc Andre wrote: > PHP Notice: SQLite3Stmt::execute(): Unable to execute statement: database > is locked > SQLite3::prepare(): Unable to prepare statement: 5, database is locked > SQLite3::querySingle(): Unable to execute statement: database is locked > > We can not

[sqlite] Wierd Locking problem

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 3:45pm, Luc Andre wrote: > I'm sure no process open the file using the SQLite API in write mode. You are, but the software has to check for it, and occasionally two of your threads do the same check at the same time. I'm afraid that if you have already set a timeout I

[sqlite] SQlite database access over wireless network

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 5:43pm, Mike McWhinney wrote: > What is happening is that something that takes 1 or 2 seconds on a > wirednetwork will take 15-20 seconds over wireless. I did two downloads of a big .zip file earlier today, one via WiFi, the other via Ethernet. They came from the same

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 10:38am, Jeff M wrote: > Looking at Xcode's memory report (and using Instruments), I see that memory > does ratchet up, despite my being very careful matching alloc/releases (this > app is pre-ARC). I need to relearn Instruments. You were tricked. You don't need to

[sqlite] Performance problems on windows

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 9:52am, Jakub Zakrzewski wrote: > Thanks for interest. If I can provide any useful information, just tell me, > what you need. I cannot reveal the source code but some profiling results or > SQL statements are not a secret. Can you provide a short series of SQL statements

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > When querying views sqlite shows qualified column names if they are specified > individually. Sorry but this has been mentioned a few times here and won't be changed. The SQL standard doesn't mention column names so SQL engines are free to do

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:23pm, Roger Binns wrote: > Generally you would be better off using something like homebrew: > > http://brew.sh/ > > [snip] > > Instruments isn't too bad, but IIRC does not do the same thing as > valgrind. Instruments is a lighter less thorough functionality. > Simon

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:52pm, sqlite-mail wrote: > I can understand your point, what confuses me is that when we query a view > with "a.*" it doesn't qualify the names so I thought that was a mistake when > we use individual names otherwise I would expected qualified names there too. I understand

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 8:52pm, Scott Robison wrote: > On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > >> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: >> >>> I vote to change it every release... Stimulate better habits! >> >> Seconded. Keep them on their toes! > > Or randomly generate names

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 25 Aug 2015, at 10:27pm, Tim Streater wrote: > So how does that work with: > > create table newtable as select * from oldtable; > > Does that mean that, in principle, I could have any random set of column > names for my new table? Future versions of SQLite can do anything. In real

[sqlite] order by not working in combination with random()

2015-08-26 Thread Simon Slavin
On 26 Aug 2015, at 8:00am, J Decker wrote: > select random() order by random() should definately reprocess the function... Agreed. But I've come to the conclusion that SELECT random() AS rr ORDER BY rr should not. Here's a nasty result SQLite version 3.8.10.2 2015-05-20 18:14:01

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte wrote: > But like it's already done on several other cases why not fix this issue and > wrap this fix with "#ifdef SQLITE_CLEAN_COLUMN_NAMES" that's not defined by > default so older code will remain working but new code can enable this and >

[sqlite] order by not working in combination with random()

2015-08-26 Thread Simon Slavin
On 26 Aug 2015, at 11:27am, tonyp at acm.org wrote: > Plus, it apparently recognizes if the random() expression in the ORDER BY is > the same as the SELECT one and again sort correctly (without re-evaluating) > and without needing an alias. Ah, but I would call /that/ a bug ! Simon.

[sqlite] order by not working in combination with random()

2015-08-27 Thread Simon Slavin
On 27 Aug 2015, at 9:11am, Domingo Alvarez Duarte wrote: > A very instructive post, could you give your opinion about what should be the > behavior for the "WHERE" clause ? > > I meam if we have a function on the field definition and reference it on the > "WHERE" clause: > > CREATE TABLE

[sqlite] why I don't get an error ?

2015-08-27 Thread Simon Slavin
On 27 Aug 2015, at 3:06pm, Nicolas J?ger wrote: > so the only reason to define datatype in sqlite is for the size on > the disk ? Nope. It has no effect on the size on disk. > so why not just only using `BLOB` (excepted for `INTEGER PRIMARY > KEY`) ? > > being less persmissive wouldn't

[sqlite] explain plan change between SQLite 3.8.3.1 and 3.8.11.1

2015-08-27 Thread Simon Slavin
On 27 Aug 2015, at 3:20pm, Hick Gunter wrote: > But you have to run the query as opposed to just parsing EXPLAIN You have to _prepare() it. You don't have to use _step() . Though I suppose you should _finalize() it if you don't intend to use _step() . Simon.

[sqlite] order by not working in combination with random()

2015-08-27 Thread Simon Slavin
On 27 Aug 2015, at 6:41pm, Domingo Alvarez Duarte wrote: > select random(), random() from blah order by random() > > > > Error ambiguous column "random()" near "order by". Thing is, that's not ambiguous. I don't really care how SQLite implements it, but there is no excuse for

[sqlite] Insertion into the large DB drastically slows down at some point

2015-08-28 Thread Simon Slavin
On 28 Aug 2015, at 3:15am, Yuri wrote: > * Database is written into memory > [...] > How can I understand why the slowdown occurs? Especially, why the slowdown in > so "sharp"? Your computer has a certain amount of free memory. Once your database is bigger than that size the computer has to

[sqlite] Insertion into the large DB drastically slows down at some point

2015-08-28 Thread Simon Slavin
On 28 Aug 2015, at 3:45am, Yuri wrote: > My computer has 24GB ob RAM of which 4GB is free. At the time of the problem > the size of the process is 325MB. And the size of complete DB is ~250MB. So > this isn't it. > > What's worth mentioning though is that at the time of the event in question

[sqlite] WHERE clause not working in combination with random()

2015-08-28 Thread Simon Slavin
On 28 Aug 2015, at 10:20am, Domingo Alvarez Duarte wrote: > Please remember that the "random" function here is only a detail the real > problem is the "column expression" been reevaluated more than once. Yes. When considering fixes for this problem one needs to also consider

[sqlite] Aquameta Layer 0: meta - Writable System Catalog for PostgreSQL

2015-08-29 Thread Simon Slavin
On 29 Aug 2015, at 9:38pm, Darren Duncan wrote: > On 2015-08-29 10:41 AM, Domingo Alvarez Duarte wrote: >> It would be nice to have something like this on sqlite too ! >> >> http://blog.aquameta.com/2015/08/29/intro-meta/ I would prefer a system conforming to the information schema part of

[sqlite] Aquameta Layer 0: meta - Writable System Catalog for PostgreSQL

2015-08-30 Thread Simon Slavin
On 29 Aug 2015, at 10:46pm, Petite Abeille wrote: > Yes, something along these lines: By Golly, I think that was it ! Simon.

[sqlite] I don't understand why I get "cannot start a transaction within a transaction"

2015-08-31 Thread Simon Slavin
On 31 Aug 2015, at 2:23pm, Stephan Beal wrote: > Nope - you have only run the BEGIN part of the transaction. prepare() > prepares only one single statement, not multiples (you have 4 statements in > your SQL). Thus when you try to run another transaction, that BEGIN is > still open. In

[sqlite] Why Corrupted DB File Cause No Error?

2015-12-02 Thread Simon Slavin
On 2 Dec 2015, at 11:38am, Stephan Beal wrote: > On Wed, Dec 2, 2015 at 11:59 AM, sanhua.zh wrote: > >> Why it does not show error, some thing like?Error: database disk image is >> malformed?? Is it a bug in SQLite? > > because you didn't corrupt a part it actually read. Looking at the

[sqlite] maybe bug in regexp and replace with newlines?

2015-12-02 Thread Simon Slavin
On 2 Dec 2015, at 12:54pm, michael wrote: > sqlite3 -header flexsql.db "select distinct text from v_term_item where > name='text' and lower(text) REGEXP('.*some_text.*');" > which doesn't works REGEXP is not compiled into SQLite by default. Simon.

[sqlite] TEXT columns with Excel/VBA

2015-12-02 Thread Simon Slavin
On 2 Dec 2015, at 4:34pm, Erwin Kalvelagen wrote: > I could not find a reference to this using Google. So my question is: Is > this a known problem? I would like to understand a little bit better what > this is about. The bug, if there is a bug, must be in Excel/VBA. SQLite will accept

[sqlite] TEXT columns with Excel/VBA

2015-12-03 Thread Simon Slavin
On 3 Dec 2015, at 12:49pm, R Smith wrote: > I *ALWAYS* write cross-platform code as far as SQL is concerned. I even think > in this day and age every programmer should, or is there a case for the > opposite? If cross-platform code worked identically cross-platform I'd rest more easily. The

[sqlite] SQLite - Support for VSS writer

2015-12-03 Thread Simon Slavin
On 3 Dec 2015, at 10:17am, Murdare, Vijaykumar S (GE Oil & Gas) wrote: > 1) If read operation is in progress, then can I take backup safely with > file copy or any other third party tool? When taking a backup of the database file you should also copy all other files with similar names

[sqlite] website documentation wording

2015-12-04 Thread Simon Slavin
On 4 Dec 2015, at 3:59pm, Jay Kreibich wrote: > It is actually in the ISO standard that the proper pronunciation is ?ess cue > ell?. It became ?sequel? in some circles, mostly thanks to Microsoft. Unfortunately I work as a contractor and if I can pick up the client's pronunciation and copy

[sqlite] Exporting

2015-12-06 Thread Simon Slavin
If you cannot run any program apart from the ones already installed then your only option is to copy the database file to another computer. - Simon > On 6 Dec 2015, at 8:35 p.m., Thomas Morris wrote: > > Unfortunately, the application is required. I am working on a government > network

[sqlite] Create table while a dbdatareader is open

2015-12-07 Thread Simon Slavin
On 6 Dec 2015, at 8:46pm, Lars Fiedler wrote: > Is it possible with certain settings to have a dbdatareader iterating through > rows, and at the same time create a new table? I've tried various settings - > read uncommitted, wal mode, shared cache. But it looks like the open reader > has a

[sqlite] sqlite3_errmsg and wide char

2015-12-08 Thread Simon Slavin
On 8 Dec 2015, at 12:31am, Scott Robison wrote: > This may be true of OS X, but it not true of Mac all through history. They > might not have been called "code pages" but Mac most definitely had > different character sets to support different markets. Yep. OS 9 supported string processing and

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-08 Thread Simon Slavin
On 8 Dec 2015, at 12:19am, Patrick Donnelly wrote: > There are still writes: Because you have not defined any transactions, each of your INSERT commands it getting wrapped in its own transaction. A transaction has to involve writes to disk. Try this ... BEGIN INSERT INTO t1 ... END See

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-08 Thread Simon Slavin
On 8 Dec 2015, at 10:16am, Domingo Alvarez Duarte wrote: > If I understood correctly when no transaction is specified an implicit > transaction is created so there is no point to create a transaction for only > one statement. The OP here has lots of INSERT commands and is complaining that

[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin
On 8 Dec 2015, at 10:18pm, Bart Smissaert wrote: >> on standard output > But how this work in concrete steps? Does code have to be added to SQLite > to write for example to a text file? SQLite sends text to the standard output channel while your program is making SQLite calls. You should be

[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 12:30am, Bart Smissaert wrote: > So, what/where is that standard output channel? > This is on a Win7 machine. How do I bring up that console window? > There is no development environment here. I am running this from Excel. Then Excel is getting the output. And since Excel is

[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 12:35am, Bart Smissaert wrote: > So, do I need to somehow re-direct this output to a text file? I don't think it can be done. If the actual program you're running is Excel then you're relying on Excel to do this stuff. And since Excel is a spreadsheet program and not a

[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 12:45am, Bart Smissaert wrote: > Excel doesn't do much, all the real work is done by that ActiveX dll and I > have full access to that as I coded that. > Surely there must be simple way to dump debugging data to say a text file. Sure. Run your own program, not one someone

[sqlite] How to see SQLite debugging information

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 12:45am, Bart Smissaert wrote: > Surely there must be simple way to dump debugging data to say a text file. Sure. Run Excel as a command rather than launching it in the Windows GUI. Simon.

[sqlite] INSERT OR IGNORE consuming too many rowids

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 8:35pm, Wade, William wrote: > https://www.sqlite.org/autoinc.html says (for the no AUTOINCREMENT case, > which applies to the original post) "If no ROWID is specified on the insert > ... [the] usual algorithm is to give the newly created row a ROWID that is > one larger

[sqlite] INSERT OR IGNORE consuming too many rowids

2015-12-09 Thread Simon Slavin
On 9 Dec 2015, at 9:10pm, David Baird wrote: > My cocnern is that: the database engine shouldn't > needlessly waste/discard perectly good chunks of rowids Please don't think of them as 'chunks'. There is no order to the numbers it picks. An alternative way to think of the AUTOINCREMENT

[sqlite] Making data unique

2015-12-10 Thread Simon Slavin
On 10 Dec 2015, at 10:17am, Bart Smissaert wrote: > This will show in sqlite_master like this: > > type name tbl_name rootpage sql > --- > index sqlite_autoindex_dataset_1 dataset 717 >

[sqlite] ABOUT ROWID

2015-12-11 Thread Simon Slavin
On 11 Dec 2015, at 8:29am, ??? <2004wqg2008 at 163.com> wrote: > 1.Reboot computer > 2.Shut down computer ,and then start computer I am sorry to say that ??? (copy and paste, I don't know Chinese !) has given the first correct answer. There are at least three levels of caching involved in

[sqlite] Selecting total and not used in one query

2015-12-12 Thread Simon Slavin
On 12 Dec 2015, at 2:42pm, Cecil Westerhof wrote: >> SELECT >>(SELECT COUNT(*) FROM proverbs) AS Total >>, (SELECT COUNT(*) FROM proverbs WHERE used IS NOT NULL) AS Used >>, (SELECT COUNT(*) FROM proverbs WHERE used IS NULL) AS Free >> > > ?That is what I am using

[sqlite] Selecting total and not used in one query

2015-12-12 Thread Simon Slavin
On 12 Dec 2015, at 6:14pm, Cecil Westerhof wrote: > ?Not at the moment. But maybe that is a good idea.? With clauses like >>> WHERE used IS NOT NULL) AS Used >>> WHERE used IS NULL It should transform the work done. Simon.

[sqlite] website documentation wording

2015-12-12 Thread Simon Slavin
On 12 Dec 2015, at 6:19pm, Mohit Sindhwani wrote: > Well, at least as far as SQLite goes, I think this settles it unambiguously > for me: > https://www.youtube.com/watch?v=giAMt8Tj-84 "As soon as I have a person need for Foreign Keys I'm sure you'll see them come in pretty quick." -- Richard

[sqlite] Selecting total and not used in one query

2015-12-12 Thread Simon Slavin
On 12 Dec 2015, at 7:52pm, Cecil Westerhof wrote: > ?Here http://www.tutorialspoint.com/sqlite/sqlite_indexes.htm it is said > that you should not use an index on columns that use a high number of NULL > values. At the moment that is true. So I should not use an Index?? The tutorial thinks

[sqlite] Checking Foreign Keys

2015-12-13 Thread Simon Slavin
On 13 Dec 2015, at 12:52pm, R Smith wrote: > I don't think there would be a point of turning off FK checks, adding > non-relation data to the tables, then turning it back on, and simply get a > permanent error condition. Agreed. There is a reason to turn the checks off, however. Suppose

[sqlite] last_insert_rowid() and changes() per statement instead of per connection?

2015-12-13 Thread Simon Slavin
On 13 Dec 2015, at 5:34pm, Clemens Ladisch wrote: > Olivier Mascia wrote: >> should the design of competing threads revolve around each one having >> a distinct connection handle? > > Yes. Which, of course, decreases the point of you having competing threads in the first place. Which is

[sqlite] Very Strange and Interesting Problem

2015-12-14 Thread Simon Slavin
On 14 Dec 2015, at 10:21am, ??? <2004wqg2008 at 163.com> wrote: > Here is a very strange and interesting problem. Your problem with renaming is not caused by SQLite. How are you talking to SQLite ? Have you written a C program which calls the SQLite API ? Are you using the command line

[sqlite] SELECT CAST('' AS INTEGER) returns zero instead of null

2015-12-15 Thread Simon Slavin
On 14 Dec 2015, at 2:26pm, Anthony Damico wrote: > hi, sql standard says to strip whitespace and then convert. "" coercing to > zero instead of NULL strikes me as very odd.. thanks In your command SELECT CAST('' AS INTEGER) you explicitly tell it to CAST('' AS INTEGER) which means it has

[sqlite] Fastest read?

2015-12-15 Thread Simon Slavin
> On 15 Dec 2015, at 7:18am, ??? <2004wqg2008 at 163.com> wrote: > >I want to improve the speed of the retrieve records. >I try so many methods. and find the result is not good. Such as retrieve > by rowid, index and so on. >Is there any other method which can improve the retrieve

[sqlite] Running Sqlite on 64-bit/Client-server data base

2015-12-16 Thread Simon Slavin
On 15 Dec 2015, at 11:47pm, Hamdan Alabsi wrote: > Also, does sqlite support client-server database engine ? No. Your program calls SQLite API routines. Those routines read and write the file. There is no server. Simon.

[sqlite] about attach database

2015-12-16 Thread Simon Slavin
On 16 Dec 2015, at 8:37am, Dominique Pell? wrote: > Having said all that, reading https://www.sqlite.org/c3ref/open.html > I see no mention of the fact that sqlite3_open*() is lazy. > Is it documented somewhere? Not in the official SQLite documentation. But it is easy to prove. Just open a

[sqlite] Problem with accumulating decimal values

2015-12-16 Thread Simon Slavin
On 16 Dec 2015, at 3:46pm, Adam Devita wrote: > As a matter of interest, when calculating interest on a sum of money > expressed in pennies, how do you handle int arithmetic truncating? > Is that an accounting design rule thing when dealing with fractions of > a penny to round? When writing

[sqlite] Index on computed value?

2015-12-16 Thread Simon Slavin
On 16 Dec 2015, at 4:23pm, Zsb?n Ambrus wrote: > See http://sqlite.org/expridx.html "The ability to index expressions was added to SQLite with version 3.9.0 in October of 2015" Nice to see that the development team's crystal ball is running around three months ahead of questions on this

[sqlite] batch or one by one?

2015-12-17 Thread Simon Slavin
On 17 Dec 2015, at 4:24am, ??? <2004wqg2008 at 163.com> wrote: > 1.Retrieve by batch such as sqlite3_get_table. As the documentation says, please do not use sqlite3_get_table(). It was written a long time ago and better calls are now available. "This is a legacy interface that is

[sqlite] Problem with accumulating decimal values

2015-12-17 Thread Simon Slavin
On 17 Dec 2015, at 4:22am, R Smith wrote: > it was a seemingly too-convoluted detour for simply saying: "Don't store > rounded numbers. Round only the results." I was taught "Round [only] before printing.". These days it would be something like "Round [only] before your API returns to the

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 3:17am, ??? <2004wqg2008 at 163.com> wrote: > When we compile the sqlite source code, there are so many > configuration, such as > SQLITE_DEFAULT_FILE_FORMAT=4; > SQLITE_MAX_ATTACHED=30; > SQLITE_ENABLE_COLUMN_METADATA; > SQLITE_ENABLE_FTS4; >

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 3:50am, ??? <2004wqg2008 at 163.com> wrote: > How about the following settings: Read the documentation for those settings. Given what they do which ones, if any, do you think will influence performance ? Simon.

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 3:56am, ??? <2004wqg2008 at 163.com> wrote: > Thank you very much. Why are you asking your question ? Is your program which uses SQLite too slow ? If so, how much too slow is it ? Just a little bit or a lot too slow ? Simon.

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 4:23am, ??? <2004wqg2008 at 163.com> wrote: >first method , configure settings; >second method , the other is how to use sqlite_table, could the > sqlite_master table help us improve performance ? Okay, now I can help you. Neither of those things will help with

[sqlite] What does output from integrity check mean and how can I prevent this?

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 5:04am, Andy KU7T wrote: > How could this be happening? Disk failure, power failure, etc? Those things seem the most likely in the circumstances but there are some other possibilities: > How can this be detected at run time (can

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 6:19am, ??? <2004wqg2008 at 163.com> wrote: > The meaning of "how to use sqlite_table" is that I guess the sqlite_table > may have contained some information which could help to improve speed. > I am not meaning to modify the data structure of sqlite_master. There is

[sqlite] about compile configure

2015-12-21 Thread Simon Slavin
On 21 Dec 2015, at 10:07am, ??? <2004wqg2008 at 163.com> wrote: >CREATE TABLE poiTable (poiId INTEGER NOT NULL, versionId INTEGER NOT NULL, > regionId INTEGER , postalCode TEXT , phone TEXT , attrBitMask INTEGER , > attributeBlob BLOB , primary key (poiId)); >So the poiId is equal to

[sqlite] SQLite Vulnerabilities reported in NVD

2015-12-22 Thread Simon Slavin
On 22 Dec 2015, at 7:02am, Saurav Sarkar wrote: > But the queries will be always parametrized ones. Exploits 1 and 2 are controlled by things which can't be parameterised. I'm not 100% sure about the format string of a printf, but I can't think of a way to parameterise it. So you would seem

[sqlite] SQLite Vulnerabilities reported in NVD

2015-12-22 Thread Simon Slavin
On 22 Dec 2015, at 1:16pm, Matthias-Christian Ott wrote: > Some software uses the affected versions and it's a good idea they know > that the software is affected. It's a matter of transparency. But it doesn't say when the vulns are fixed so it's not useful to people looking to fix their

[sqlite] about compile configure

2015-12-23 Thread Simon Slavin
On 23 Dec 2015, at 4:46am, ??? <2004wqg2008 at 163.com> wrote: > sqlite3_soft_heap_limit64() , cache_szie and so on also which could not help > improve the speed These commands reduce the amount of memory your application uses. They will not help increase the speed unless you are repeatedly

[sqlite] whish list for 2016

2015-12-24 Thread Simon Slavin
On 24 Dec 2015, at 3:12pm, John McKown wrote: > ?I'm curious as to why. Doing so would, most likely, require rewriting the > entire table. If you want a SELECT * to get the columns in a particular > order, just create a VIEW with the columns in the order in which you want > them. I think

[sqlite] whish list for 2016

2015-12-24 Thread Simon Slavin
On 24 Dec 2015, at 5:10pm, Richard Damon wrote: > being able to directly add a field would be nice. You can directly add a field. Simon.

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Simon Slavin
On 24 Dec 2015, at 9:10pm, Bart Smissaert wrote: > Given that I don't use theses it then likely that my problem is to do with > a buffer overwrite? You say you use sqlite3_bind(). See the details about the fifth parameter in A common mistake is

[sqlite] whish list for 2016

2015-12-25 Thread Simon Slavin
On 25 Dec 2015, at 2:35am, Bernardo Sulzbach wrote: >> ALTER TABLE table-name RENAME COLUMN column_field_name TO >> new_column_field_name; > > Are you sure? The documentation does not have anything about this and > I get a syntax error using 3.9.2 (a bit outdated, I know). John's confused.

[sqlite] whish list for 2016

2015-12-25 Thread Simon Slavin
On 25 Dec 2015, at 2:24am, John McKown wrote: > DELETE is normally done as: ALTER TABLE table-name DROP ?COLUMN > column_file_name; and would be a very nice addition. I hadn't noticed that > it is missing. I wonder why. SQlite stores all the data for a row together in column order. col1,

[sqlite] whish list for 2016

2015-12-25 Thread Simon Slavin
On 25 Dec 2015, at 12:39pm, Valentin Davydov wrote: > It would be desirable to improve algorithm of INTEGRITY_CHECK pragma. > Presently it is generally useless for indexed databases which don't fit > entirely in RAM (and which usually need checking much strongly than > smaller ones). Valentin,

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Simon Slavin
On 26 Dec 2015, at 5:23pm, Bart Smissaert wrote: >> all is perfectly fine when the SQL statement has only one UDF in it > > Just a correction on this. Have now also seen problems when there is only > one UDF in the SQL statement. > It is not entirely predictable, so sometimes get crash and on

[sqlite] Locked database

2015-12-27 Thread Simon Slavin
On 27 Dec 2015, at 5:11pm, Yuriy M. Kaminskiy wrote: > (I know, I'm a bit late for discussion, but...) ... but you know the language (script system) the OP was writing in and you understand the problems involved in scripting SQLite. Great post. Simon.

[sqlite] The Lock-Byte Page

2015-12-27 Thread Simon Slavin
On 27 Dec 2015, at 10:08pm, Olivier Mascia wrote: > What I don't really get straight is what file-locking related mechanism would > have a use for those bytes, knowing they wouldn't even exists unless the > database size is 2^30 bytes or more? Some operating systems for unusual operating

[sqlite] How is the name of the db file is identified?

2015-12-28 Thread Simon Slavin
On 28 Dec 2015, at 2:02am, Igor Korot wrote: > Is it possible to save the SQLite DB file whose name contains some Unicode > characters? The filename you pass to sqlite3_open_v2() should be encoded in UTF-8. The filename you pass to sqlite3_open16() should be encoded in UTF-16. Both of these

[sqlite] whish list for 2016

2015-12-28 Thread Simon Slavin
On 28 Dec 2015, at 9:01am, Valentin Davydov wrote: > As far as I understand, INTEGRITY_CHECK simply iterates over the records > (of tables and indices) one by one in some arbitrary order. So, if the > database is too big to fit in the available memory (sqlite's own cache, > system file cache

[sqlite] SQLITE_DEFAULT_WORKER_THREADS & SQLITE_MAX_WORKER_THREADS

2015-12-29 Thread Simon Slavin
On 28 Dec 2015, at 11:24pm, Olivier Mascia wrote: > If SQLITE_MAX_WORKER_THREADS is not predefined, it defaults to 8. > If SQLITE_DEFAULT_WORKER_THREADS is predefined let's say to 12, then > SQLITE_MAX_WORKER_THREADS is raised to match the default. > > I must be missing something important

[sqlite] Database locked error with only one process?

2015-12-30 Thread Simon Slavin
On 30 Dec 2015, at 5:12pm, Jason H wrote: > I read around, and it seems that the consensus is it should only be locked > during a multi-thread/multi-process update. Nope. The database is locked any time a transaction is under way [1]. Your program cannot know if another process is going to

[sqlite] test for bounce detection

2015-02-13 Thread Simon Slavin
This is a test message. I just sent another message to the list and it got bounced with the message "Relay access denied" so I want to see if this one made it. If it does, can the listadmin see if there's anything wrong ? Sorry to occupy your Friday night or weekend. Simon.

[sqlite] sqlite journal file question

2015-02-14 Thread Simon Slavin
On 13 Feb 2015, at 10:19pm, Mayank Kumar (mayankum) wrote: > -by syncing, I mean taking the modifications on the active machine and > sending over wire to another machine(in some proprietary format) , where > there is a similar sqlite application which receives the records and the > records

[sqlite] test for bounce detection

2015-02-14 Thread Simon Slavin
On 13 Feb 2015, at 11:39pm, David King wrote: > Maybe unrelated, but in the last few hours the list ID header changed from > "sqlite-users.sqlite.org" to "sqlite-users.mailinglists.sqlite.org", which > messes up my mail filtering. Thanks, David. That was it. For others: messages from the

[sqlite] test for bounce detection

2015-02-14 Thread Simon Slavin
On 14 Feb 2015, at 4:25am, Mike Owens wrote: > So I updated mailman today to use mailinglists.sqlite.org rather than > sqlite.org:8080 knowing that there is a good chance some issues will arise. > I have been fixing them as they surface. This issue is related to the > Postfix config not

[sqlite] Complex insert query to normalised database

2015-02-18 Thread Simon Slavin
On 18 Feb 2015, at 11:38am, Flakheart wrote: > I can deal with single table inserts but I think this would be some sort of > nested insert statement? There are no statements in SQL which can modify more than one table. So you will need to use a number of commands, one for each table.

[sqlite] Error 1032: SQLITE_READONLY_DBMOVED with one writer and one reader process

2015-02-18 Thread Simon Slavin
On 18 Feb 2015, at 4:09pm, Gillot Lamure Leo (Consultant) wrote: > We're trying to use sqlite on an embedded linux with one process regularly > writing entries in a db and another process removing the entries by batch. What file system does the volume with the database file on use ? > It

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Simon Slavin
On 19 Feb 2015, at 7:31am, Olivier quoted: > it would be interesting to put *all* sqlite.org pages in the database, even > if it is useless. This would test with 500K HTTP requests per day. It will > then be possible to modify this paragraph and indicate that Sqlite smoothly > manages the

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Simon Slavin
> On 19 Feb 2015, at 8:26am, Flakheart wrote: > > If I insert a recipe with a specific category and then a different recipe > that uses the same category, how then does this foreign key work without > storing duplicate categories in the category table? > > Then later on, I need a recipe to be

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Simon Slavin
Sorry, I accidentally included 'INTEGER' before 'REFERENCES'. Should have been CREATE TABLE category( category_id INTEGER PRIMARY KEY AUTOINCREMENT, category_name TEXT ); CREATE TABLE recipes_in_categories( r_i_c_idINTEGER PRIMARY KEY AUTOINCREMENT,

[sqlite] Getting the current value of busy_timeout

2015-02-20 Thread Simon Slavin
On 20 Feb 2015, at 12:08am, Richard Hipp wrote: > You can add a hack to the code. But other than that, no. Given that so many PRAGMAs have a way to find out the current setting, could this be added without too much extra code ? There are only three PRAGMA settings which don't have this:

[sqlite] read uncommitted data consistency

2015-02-21 Thread Simon Slavin
On 21 Feb 2015, at 9:01pm, Yuriy Stelmakh wrote: > When using read uncommitted pragma, is it possible to get a row of data > where some columns reflect state of that row at one point, while others at > another? For example when you are reading in one thread while writing in > another. No.

[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-22 Thread Simon Slavin
On 22 Feb 2015, at 6:10pm, russ lyttle wrote: > The "natural" language for the Raspberry PI is Python. For Arduino it is > C++. Arduinos are programmed in 'Wiring' which is descended from 'Processing', which is a very small subset of C++ with a few library functions added. It's so small

[sqlite] Backup API and WAL

2015-02-23 Thread Simon Slavin
On 22 Feb 2015, at 11:15pm, Donald Shepherd wrote: > If I use the backup API to create a copy of an SQLite database that uses > Write-Ahead Logging, will the resulting copy reflect the contents of both > the base database file and the -wal file? Until a transaction is COMMITted, it's not part

[sqlite] How to insert a pointer data to sqlite?

2015-02-25 Thread Simon Slavin
On 25 Feb 2015, at 1:07am, YAN HONG YE wrote: > I have a data: > Idpid namemark > 1 0 f1 sample > 2 1 f2 sample > 3 1 f3 sample > 4 2 f4 sample > 5 2 *id(2).name *id(2).mark >

[sqlite] Regarding creating a mem object and copying contents to it in SQLite

2015-02-25 Thread Simon Slavin
On 25 Feb 2015, at 10:21am, Sairam Gaddam wrote: > Yaa we work together and we need some assistance regarding that. See our responses to Prakash Premkumar. The things he thought he could optimize turned out to be unhelpful. You will find that just using normal SQLite calls you get

[sqlite] recurrent failure mode

2015-02-25 Thread Simon Slavin
On 25 Feb 2015, at 8:23pm, Dave Dyer wrote: > The facile explanation would be that a transaction to insert a new > record was executed twice, but the indexes were incorrectly maintained. > > INSERT INTO "preference_table" VALUES('Picture Placer-707-1304b-19-Maranda >

[sqlite] Appropriate Uses For SQLite

2015-02-25 Thread Simon Slavin
On 25 Feb 2015, at 8:13pm, Jim Callahan wrote: > I first learned about SQLite in the Bioconductor branch of R. I figured if > they could handle massive genetic databases in SQLite, SQLite ought to be > able to handle a million (or even 12 million) voters in a voter file. I'm guessing that

[sqlite] recurrent failure mode

2015-02-26 Thread Simon Slavin
On 26 Feb 2015, at 12:26am, Dave Dyer wrote: >> Do you have any multi-access things going on ? Two or more computers, >> applications, processes or threads trying to access the database at the same >> time ? > > No, but it would be normal for the database to be on a different > computer

<    1   2   3   4   5   6   7   8   9   10   >