Re: [sqlite] sqlite error

2014-01-21 Thread Simon Slavin
On 21 Jan 2014, at 5:03am, d b wrote: > sqlite throws error code 1 while sqlite busy with read/write operations. > what could be the reason. But, I could not reproduce this with test > program. what is the best way to handle sqlite error. Is it like sqlite > abort case? I

Re: [sqlite] Application statically linked with sqlite3.6 creates sqlite2.1 files

2014-01-23 Thread Simon Slavin
On 23 Jan 2014, at 1:58pm, Joachim Bürmann wrote: > On a certain customer system (Windows7 64bit) the application cannot > read the example project files (created with sqlite3.6 library). And > when the user stores his own settings in a new project, the project file > is

[sqlite] Delay to SQLite testing

2014-01-23 Thread Simon Slavin
Thought you guys might get a blast out of a reason that SQLite testing has been delayed: [Safe for work. No sound.] Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] export table to csv

2014-01-25 Thread Simon Slavin
On 24 Jan 2014, at 6:24am, Frantisek Cerven wrote: > I want to ask you if is any way to call sqlite special commands > programatically from c#. These 'special commands' are not in SQLite at all. They are features of the command-line shell application. SQLite does not

Re: [sqlite] Getting Error at line 16265 (v3.8.2)

2014-01-25 Thread Simon Slavin
On 24 Jan 2014, at 5:09pm, Hiew William wrote: > I’m getting error from sqlite3.c when i’m trying to run my application in > development…… Which error ? In other words, what's the error message ? And what API function is your application trying to execute when you get

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Simon Slavin
On 26 Jan 2014, at 10:32pm, Petite Abeille wrote: > What SQLite would really benefit from is a proper, consistent, queryable data > dictionary such as the the standard information schema: > > http://en.wikipedia.org/wiki/Information_schema I would like that for in

Re: [sqlite] Boolean and DataReader

2014-01-29 Thread Simon Slavin
On 29 Jan 2014, at 10:19pm, Johnny wrote: > Now I'm using the sql browser to create a table column of type numeric > Boolean. No you're not. See section 1.1 of If some application presents a boolean type to you and then it's

Re: [sqlite] Keeping Track of Records of IDs in one table. Possible?

2014-01-29 Thread Simon Slavin
On 29 Jan 2014, at 10:42pm, jose isaias cabrera wrote: > The tables are created this way: > CREATE TABLE OpenProjects (id integer primary key, ProjID integer, createDnT, > unique(id)); > CREATE TABLE OpenJobs (id integer primary key, ProjID integer, Task, > unique(id));

Re: [sqlite] order of = in join

2014-01-30 Thread Simon Slavin
On 30 Jan 2014, at 4:24pm, E. Timothy Uy wrote: > Here the Terms_content table is big, maybe 300k rows, while the Favorites > table is small, <100 rows. Query #1 takes 300 ms, and query #2 takes 30 ms. Have you run ANALYZE on the database ? Simon.

Re: [sqlite] Fine tuning table indexes

2014-01-31 Thread Simon Slavin
On 31 Jan 2014, at 4:41pm, Andreas Hofmann wrote: > I would like to fine tune table indexes. I want to make sure I got indexes > for the columns or combined columns of all (most) where clauses. The issue > is that the application builds dynamic SQL strings all over

Re: [sqlite] Database Grammar 101

2014-02-01 Thread Simon Slavin
On 1 Feb 2014, at 10:59am, RSmith wrote: > The plural of Index is always "Indices", never "Indexes". I started with 'indices' when posting to this list but I found that some of the many foreign readers of this list apparently missed my meaning. It's easy for someone

Re: [sqlite] ORDER BY issue v3.8.2 amalgamtion

2014-02-01 Thread Simon Slavin
On 1 Feb 2014, at 3:53am, Labar, Ken wrote: > Upgrading from 3.7.14.1 to 3.8.2 our previously sorted queries are no > longer sorted. > Testing this same database with the win7 binary 3.8.2 the query is correctly > sorted. Does your query include an ORDER BY clause ? If

Re: [sqlite] Fine tuning table indexes

2014-02-01 Thread Simon Slavin
On 1 Feb 2014, at 4:21pm, Stephen Chrzanowski wrote: > What was the raw results of some of the queries? Obviously query and > explain, but did you also tag in time deltas pre and post queries? > > I'll have to read up more on EXPLAIN. I'm aware of how indexes work as >

Re: [sqlite] Fine tuning table indexes

2014-02-01 Thread Simon Slavin
On 2 Feb 2014, at 1:09am, Keith Medcalf wrote: > No access method (yet invented) in any product (yet invented) can use more > than a single traversal path through a collection of data at any given time > during a single traversal operation. Yeah, that's why I asked for a

Re: [sqlite] ORDER BY issue v3.8.2 amalgamtion

2014-02-03 Thread Simon Slavin
On 3 Feb 2014, at 4:58am, Labar, Ken wrote: > select (rtTableSort < 1000) as selected, abbrString from userParameter order > by abbrString; > > > This used to work until we upgraded sqlite to v3.8.2. It still does work at > the PC level. Thanks for test data and SELECT

Re: [sqlite] Understanding transactions

2014-02-03 Thread Simon Slavin
On 3 Feb 2014, at 6:07pm, Baruch Burstein wrote: > I am a little unclear on some of the ways transactions affect multiple > connections. I am assuming that multiple sqlite3 objects in one program is > the same as multiple programs. Wanted to check whether you'd read this,

Re: [sqlite] Understanding transactions

2014-02-03 Thread Simon Slavin
On 3 Feb 2014, at 7:51pm, Baruch Burstein wrote: > Thank you for the explanations. If I wrap a few SELECTs in a transaction, > does this guarantee that the data I read will be consistent across all of > the SELECTs? Yes. Unless the same connection that is doing all these

Re: [sqlite] Understanding transactions

2014-02-04 Thread Simon Slavin
On 4 Feb 2014, at 8:49pm, Igor Tandetnik wrote: > If it is unable to promote the lock, then the in-memory cache will be left in > an inconsistent state and so the error code is promoted from the relatively > benign SQLITE_BUSY to the more severe SQLITE_IOERR_BLOCKED. This

Re: [sqlite] Database Grammar 101

2014-02-05 Thread Simon Slavin
On 5 Feb 2014, at 12:08pm, Dominique Devienne <ddevie...@gmail.com> wrote: > On Sat, Feb 1, 2014 at 3:09 PM, Simon Slavin <slav...@bigfraud.org> wrote: > >> But over all, English is an acquisitive (unlike German) evolving (unlike >> French) language. >

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-02-06 Thread Simon Slavin
On 6 Feb 2014, at 7:15am, big stone wrote: > If we wish to have SQLite + Python combination to become "reference choice" > in education, I would think that priority list should be : Just to remind you that you're posting to the SQLite list. Most of those are things that

Re: [sqlite] Application optimization puzzle: reading jobs from a table while writing results back to same table

2014-02-06 Thread Simon Slavin
On 6 Feb 2014, at 8:39pm, Zack Weinberg wrote: > CREATE TABLE url_strings ( >id INTEGER PRIMARY KEY, >urlTEXT NOT NULL UNIQUE > ); > > CREATE TABLE canon_statuses ( >id INTEGER PRIMARY KEY, >status TEXT NOT NULL UNIQUE > ); > >

Re: [sqlite] Send Mail from sqlite

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 9:51am, Vairamuthu wrote: > Hi > > I like to know if there is any possible to send a mail from sqlite. No it's not. Sorry, you are going to have to do some programming. Simon. ___ sqlite-users mailing

Re: [sqlite] Send Mail from sqlite

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 9:59am, Vairamuthu wrote: > Thanks for your response, it will be great help if you can get me some > sample code or algorithms, on that. That would depend on what programming language you are using and what access it has to any method of sending

Re: [sqlite] Mimic MERGE in a trigger

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 11:03am, Constantine Yannakopoulos wrote: > I would like to create a trigger on table CustomerTrans that performs the > accumulation of transaction amounts in CustomerAccum. This trigger should > - Insert a record with the transaction amount if a record

Re: [sqlite] Mimic MERGE in a trigger

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 11:32am, Constantine Yannakopoulos <alfasud...@gmail.com> wrote: > On Fri, Feb 7, 2014 at 1:27 PM, Simon Slavin <slav...@bigfraud.org> wrote: > >> Don't do it like that. >> >> Use 'INSERT OR IGNORE' to insert a record with a zero amount.

Re: [sqlite] Error: "File is encrypted or is not a database"

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 10:49am, Iksanov Husain wrote: > We have an encrypted SQLite database with a password which is set > programmatically in .NET interface. Can you tell us which encryption system you used to encrypt your database ? Did you change anything in the last day or

Re: [sqlite] Free Page Data usage

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 6:35pm, Raheel Gupta wrote: > As you may see that there is now 25% data deleted in each page. > > Now even if I do insert another 2500 rows (25% of original size) my > database size reaches 125% of the original size when I inserted the 1 > rows

Re: [sqlite] Avoiding holding a lock for too long

2014-02-07 Thread Simon Slavin
On 7 Feb 2014, at 10:44pm, Tim Streater wrote: > Now I'm finding that sometimes the "processing results here" can take a > minute or so, as it involves reading a file from disk and sending it to a > remote host. Instead of twiddling my thumbs waiting for this, I'm

Re: [sqlite] Free Page Data usage

2014-02-08 Thread Simon Slavin
On 8 Feb 2014, at 11:24am, Raheel Gupta wrote: > I dont want to repack the DB sir. > When a page becomes free I want to make sure that page is used up first and > then new pages are created. Just to explain that this would be extremely inefficient because a new row that

Re: [sqlite] Avoiding holding a lock for too long

2014-02-08 Thread Simon Slavin
On 8 Feb 2014, at 4:58pm, Tim Streater <t...@clothears.org.uk> wrote: > On 07 Feb 2014 at 23:04, Simon Slavin <slav...@bigfraud.org> wrote: > >> You should not be manually setting any handle to null. Try calling >> ->finalize() on the statement and eventually

Re: [sqlite] Free Page Data usage

2014-02-08 Thread Simon Slavin
On 8 Feb 2014, at 5:30pm, Raheel Gupta wrote: > I will try to explain more. > All my rows have the exact same size. They will not differ in size. > My problem is due to the fact that I use 64kB page size. > My rows are exactly 8 Bytes + 4096 Bytes. Your very specific use

Re: [sqlite] Free Page Data usage

2014-02-09 Thread Simon Slavin
On 9 Feb 2014, at 10:45am, RSmith wrote: > On 2014/02/09 12:06, Raheel Gupta wrote: >> Sir, I have only one auto increment primary key. >> Since the new rows will always have a higher number will the pages >> which have some free space by deleting rows with lower numbered

Re: [sqlite] LIKE operator and collations

2014-02-09 Thread Simon Slavin
On 9 Feb 2014, at 11:18am, Constantine Yannakopoulos wrote: > So, a full table scan seems inevitable. I can't answer the specific question you asked, but I have a suggestion for your program: store two text columns in the table. The first is the text as entered. The

Re: [sqlite] LIKE operator and collations

2014-02-09 Thread Simon Slavin
On 9 Feb 2014, at 4:21pm, Yuriy Kaminskiy wrote: > Unfortunately, builtin LIKE ignores collation, and if you override LIKE (as in > ICU extension), sqlite won't use index for optimization. However, this particular use of LIKE ... > SELECT * FROM ATable WHERE AColumn LIKE

Re: [sqlite] LIKE operator and collations

2014-02-09 Thread Simon Slavin
On 9 Feb 2014, at 6:05pm, Constantine Yannakopoulos wrote: > - You are assuming that 'z' is the higher order character that can appear > in a value. This is not the case; for instance greek characters have higher > order than 'z'. This can be fixed (only for latin/greek)

Re: [sqlite] Free Page Data usage

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 11:29am, Raheel Gupta wrote: >>> 64-bit page numbers would not be backwards compatible. > > It might be possible to implement it in backwards compatible mode. I guess > SQlite has some free flags in its superblock. Maybe we can use a single > byte to

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 3:23pm, Richard Hipp wrote: > When launching sqlite3.exe with a double-click, have it open a standard > database in a standard place instead of an in-memory database as you would > get when launching sqlite3.exe with no arguments. Possibly also give >

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 4:15pm, Richard Hipp wrote: > What if, instead of opening a standard database, the sqlite3.exe > command-line shell just issued a warning message reminding the user that > they are working on a transient in-memory database and suggesting the use > of the

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-lineshell

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 5:57pm, Richard Hipp wrote: > On Mon, Feb 10, 2014 at 12:51 PM, wrote: > >> I second the idea of a kind of "WARNING: All your work will be lost, are >> you sure you want to quit? (y/N)" on trying to exit, but *ONLY* if the >> application was

Re: [sqlite] help needed for major SQLite problem

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 7:18pm, C M wrote: > I may want to deploy this app to users who would also backup their database > by having it in the Dropbox folder. What would people suggest I do about > this? Don't run the app while Dropbox is messing with its datafile. The problem

Re: [sqlite] help needed for major SQLite problem

2014-02-10 Thread Simon Slavin
On 10 Feb 2014, at 9:20pm, C M wrote: > I purposefully put the SQlite database file in the Dropbox folder because > it was my intention, with this app, to allow a user to use the app on more > than one computer and "sync" the database via Dropbox. E.g., s/he could > make

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Simon Slavin
On 11 Feb 2014, at 4:06am, James K. Lowden wrote: > ${HOME}/.sqlite/db would be my choice. Since the objective is not to let a naive user unexpectedly lose the data, it might seem a bad idea to put the file in a directory which is hidden from naive users. Just

Re: [sqlite] database table is locked issue

2014-02-12 Thread Simon Slavin
On 12 Feb 2014, at 4:44pm, Sandu Buraga wrote: > I have a process with several threads working in the same time on a > database file. I have 0 or 1 writers and 0 or N readers at a moment. All > write accesses are isolated in transactions, I am using WAL and shared >

Re: [sqlite] Field not editable

2014-02-13 Thread Simon Slavin
On 13 Feb 2014, at 8:50am, O.D. vidal wrote: > I would like a field is not editable. What is the best solution? > > For example, I have a table Country: > > id - Name > > 1 - Brazil > 2 - Canada > ... > > I want the name of the country can not be changed. This would

Re: [sqlite] Field not editable

2014-02-13 Thread Simon Slavin
On 13 Feb 2014, at 9:55am, O.D. vidal wrote: > Why do you say: > >> This would normally be done inside your programming language. > > strengthen the rule directly in the database seems common sense. I can see that argument, which is why I bothered figuring out the TRIGGER.

Re: [sqlite] SQlite3 Performnace

2014-02-14 Thread Simon Slavin
On 14 Feb 2014, at 8:54am, techi eth wrote: >> What are the changes in performance if I have single SQlite3 Database file >> (Contain 'N' table) or 'N' Database file each contain single table. > I have database on single Disk.In that case i see it is better to create >

Re: [sqlite] SQLITE3 + php, problem "fetchArray(SQLITE3_ASSOC)"

2014-02-14 Thread Simon Slavin
On 14 Feb 2014, at 11:08am, Alberto Gioia wrote: > I wrote a web application that uses a combination of webserver, php and > sqlite. > A page uses a connection to a DB to generate with a choice a "select box", > all work good on pc. > I have installed all need on a

Re: [sqlite] Windows service with SQLITE

2014-02-15 Thread Simon Slavin
On 15 Feb 2014, at 12:29pm, tejas parekh wrote: > When windows services starts and calls two processes p-1 and p-2 none of > the process is able to store data in the database. > But if i call only one p-1 with service then everything works well > meanwhile if i run p-2

Re: [sqlite] Once again about random values appearance

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 7:59am, Max Vlasov wrote: > So the nanosec example modified > > Select v-v from > ( > Select nanosec() as v from TestTable > ) > > ...shows non-zero values for the current (3.8.3) and for older (3.6.10) > version. Erm ... that

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 11:37am, Tim Streater wrote: > If I have a text column defined as it might be as MYCOL TEXT (that is with no > default value), is there a way to distinguish in some row or other between a > column into which no data has ever been entered, and a column

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 4:57pm, Tim Streater wrote: > Thanks. I should perhaps have made it clearer that I'm looking at an issue a > user has. The application gathers some data from the user via a set of fields > they complete in a browser window, which data is then gathered

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 7:08pm, Tim Streater wrote: > Yes. I'm concluding that there's something fishy with the way my > data-gathering page is operating. I've recently added "use strict"; to my > javascript and that may be exposing something. My web apps involve a hand-off

Re: [sqlite] Loadable extensions

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 6:33pm, Peter Haworth wrote: > Is there a list of available loadable extensions for functions, virtual > tables, etc? I've seen some extensions lists on the web but none of them struck me as worth bookmarking. The SQLite site includes a page of

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

2014-02-18 Thread Simon Slavin
On 18 Feb 2014, at 8:13am, Fabrice Triboix wrote: > Actually, the journal file does not get deleted when I do a SELECT just after > opening the database. Depending on your journal mode (I think), the journal file should be deleted, but then it will immediately be

Re: [sqlite] SQLite for Windows Phone bug

2014-02-19 Thread Simon Slavin
On 19 Feb 2014, at 5:06am, Martin Zikmund wrote: > SQL logic error or missing database The two usual causes of this under WinMob are both related to permissions and privileges. The folder the database file is stored in may be protected against the app opening the

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Simon Slavin
On 20 Feb 2014, at 1:56pm, Patrick Proniewski wrote: > Thanks for you reply. In fact I would like the script to remain portable. I'm > running all this on Mac OS X 10.6.8 (sqlite3 3.6.12) but I plan to share it > and use it on FreeBSD too. And developing a extension is

Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-20 Thread Simon Slavin
On 20 Feb 2014, at 2:29pm, Akintoye Olorode (BLOOMBERG/ 731 LEXIN) wrote: > Our client got the following print-out. First hint of failure is the line > "TRUNCATE 48 32768 failed". Any insights into what the root cause might be ? Have you checked the media for faults

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-20 Thread Simon Slavin
On 21 Feb 2014, at 12:45am, Richard Hipp wrote: > Long-running or overlapping readers can prevent the checkpoint from > occurring. The checkpoint will be retried again and again, but if there is > always a read transaction open on a transaction other than the most recent >

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Simon Slavin
On 21 Feb 2014, at 9:15pm, Geo Wil wrote: > I checked to see if sqlite3_step was producing an error but it was sending > back a value of 101 or SQLITE_DONE but the table data remained unchanged. Putting this sentence together with the 'Subject' header, it might just be

Re: [sqlite] Network Storage

2014-02-24 Thread Simon Slavin
On 24 Feb 2014, at 12:07pm, Richard Schülein wrote: > Is there anything needed to store the Database itself on a shared network > devices? In my opinion this is similar to an USB drive etc. That means, that > the drive don’t even know, where the database is stored. Or is

Re: [sqlite] Query Flattening / Query Optimization

2014-02-25 Thread Simon Slavin
On 25 Feb 2014, at 4:31am, Keith Medcalf wrote: > does generate a plan with only one execution of each correlated subquery, but > does not give me access to the intermediate results You might experiment with creating a view for the subquery instead of for the query as a

Re: [sqlite] Strange UNION ALL / ORDER BY behaviour

2014-02-25 Thread Simon Slavin
On 25 Feb 2014, at 4:24pm, Mark Lawrence wrote: > Attached Sorry, but you can't attach files to posts to this list. We don't want everyone sending us their homework. Could you email directly or put the files on a server somewhere ? Simon.

Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread Simon Slavin
On 26 Feb 2014, at 10:19am, William Drago wrote: > VEE is a graphical programming language similar to NI LabView. Is this Agilent VEE ? If it's very like LabView then you shouldn't be using a .NET framework at all. The normal way to use SQLite is to call SQLite

Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread Simon Slavin
On 26 Feb 2014, at 2:15pm, Incongruous wrote: > You've sparked my curiosity, what is this VEE programming language?

Re: [sqlite] 'Select' queries via pdo_sqlite are slow

2014-02-27 Thread Simon Slavin
On 26 Feb 2014, at 9:09pm, pihu...@free.fr wrote: > Benchmark (bench.php) on the « $bdd->query(...); » instruction : > Query 2 : select DateMonteeAuPlan, Debut, Fin, Statut from ReportJobs where > NomJob = 'NSAVBASE' and NomChaine like 'DCLC257%' limit 20; > => 0.0002752075195 seconde(s) >

Re: [sqlite] 'Select' queries via pdo_sqlite are slow

2014-02-28 Thread Simon Slavin
On 28 Feb 2014, at 9:48am, pihu...@free.fr wrote: > I did a fourth one with a '+' sign before the "NomJob = 'NSAVBASE'" clause > :[snip] > This one is way quicker (0.055 second instead of 2.235 seconds in my latest > test). That is a good experiment. Unfortunately it depends on you knowing

Re: [sqlite] Recommended way to delete rows

2014-02-28 Thread Simon Slavin
On 28 Feb 2014, at 5:18pm, L. Wood wrote: > If I do this, would you expect _step() for the "BEGIN TRANSACTION" query and > _step() for each "DELETE" query to be very fast, but the _step() for the "END > TRANSACTION" query to take most (99%) of the time? > > Would you expect

Re: [sqlite] New

2014-02-28 Thread Simon Slavin
On 1 Mar 2014, at 12:54am, Ashleigh wrote: > I'm trying to view files from my iphone backup I'm not sure which program it > is it says sqlite it is a black box like the windows command Sorry, your question is about the program you're using and not about SQLite.

Re: [sqlite] About "speed"

2014-03-02 Thread Simon Slavin
On 2 Mar 2014, at 1:48pm, Elefterios Stamatogiannakis wrote: > IMHO, a benchmark like this is useless without any more information. Some > questions that i would like to see answered: > > - Which SQLite and Postgres versions were used? > - Are the SQLite indexes, covering

Re: [sqlite] Why would batched write operations NOT be faster than individual ones

2014-03-02 Thread Simon Slavin
On 3 Mar 2014, at 2:14am, romtek wrote: > On one of my hosting servers (this one is a VPS), a bunch of write > operations take practically the same amount of time when they are performed > individually as when they are performed as one explicit transaction. I've > varied the

Re: [sqlite] Why would batched write operations NOT be faster than individual ones

2014-03-02 Thread Simon Slavin
On 3 Mar 2014, at 3:41am, romtek wrote: > Thanks, Simon. Interestingly, for this server, disk operations aren't > particularly fast. One SQLite write op takes about 4 times longer than on a > HostGator server. That supports the idea that storage is simulated (or

Re: [sqlite] Why would batched write operations NOT be faster than individual ones

2014-03-03 Thread Simon Slavin
On 3 Mar 2014, at 8:18am, Markus Schaber wrote: > Another way to bust your data is to rely on RAID 5 or 6 or similar, at least > if the software does not take special care. > > When those mechanisms, updating a block always results in at least 2 disk > writes: The data

Re: [sqlite] "INSERT" and "END TRANSACTION" time

2014-03-03 Thread Simon Slavin
On 3 Mar 2014, at 6:03pm, L. Wood wrote: > _bind() on a prepared statement and execution of "INSERT" are taking 70% of > the time, but the "END TRANSACTION" only 30% of the time. > > The time between _bind() and execution of "INSERT" is roughly 50/50, so it's > a total of:

Re: [sqlite] "INSERT" and "END TRANSACTION" time

2014-03-03 Thread Simon Slavin
On 3 Mar 2014, at 9:11pm, romtek wrote: > Simon, does a real disk have to be a rotating hard disk? Is there problem > with SSDs as far as SQLite is concerned? SSDs aren't a problem, and SQLite works fine with them, but they change the timings associated with SQLite a great

Re: [sqlite] "INSERT" and "END TRANSACTION" time

2014-03-03 Thread Simon Slavin
On 4 Mar 2014, at 1:15am, romtek wrote: > I have a question based on my observation. According to your numbers for a > 5400 RPM disk, one write op should take about 11 ms. However, it often > takes only about 1 ms on HostGator drives on its shared hosting servers. > Are there

Re: [sqlite] Using WHERE clauses with REAL data

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 4:14am, Donald Shepherd wrote: > It appears that using equals on floating point (REAL) data in WHERE clauses > doesn't necessarily work, presumably because of rounding errors - see below > for an example. Is this the case? Do I need to use BETWEEN

Re: [sqlite] "INSERT" and "END TRANSACTION" time

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 5:06am, romtek wrote: > If that were true, then I wouldn't be getting a very large speed-up when > enveloping write ops in an explicit transaction, would I? Sorry, I can't tell. It depends on how the virtual storage mechanism works. But if your

Re: [sqlite] Using WHERE clauses with REAL data

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 10:33am, Donald Shepherd wrote: > It's a nice idea but that's just some sample values generated by an > emulator. I've compromised and am using round() to limit it to a few > digits after the decimal when doing the comparison. If you're using

Re: [sqlite] Weird out of memory problem a prepare

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 3:09pm, Eduardo Morras wrote: > zSql= "SELECT r.name, s.content FROM resource AS r, static AS s WHERE (r.ids > = s.ids AND r.name = ?);"; > > [snip] > > Error on query: out of memory I think this might require comparing every row in resource with every

Re: [sqlite] Weird out of memory problem a prepare

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 3:15pm, Simon Slavin <slav...@bigfraud.org> wrote: > On 4 Mar 2014, at 3:09pm, Eduardo Morras <emorr...@yahoo.es> wrote: > >> zSql= "SELECT r.name, s.content FROM resource AS r, static AS s WHERE (r.ids >> = s.ids AND r.name = ?);";

Re: [sqlite] Weird out of memory problem a prepare

2014-03-04 Thread Simon Slavin
On 4 Mar 2014, at 8:05pm, Eduardo Morras wrote: > The tables have 4 rows each one, Hahahaha. Hah. That changes things. You have something wrong. Either the database is corrupt (check it with a PRAGMA or make another one) or your code is messed up somehow. As a test,

Re: [sqlite] Troubleshooting query performance

2014-03-05 Thread Simon Slavin
On 6 Mar 2014, at 12:20am, Joseph L. Casale wrote: > SELECT a.name, p.value > FROM p_attribute p > JOIN attribute a > ON a.id=p.aid > WHERE p.pid=? > > This returns all relevant rows I need, where table profile has ~6000 rows, > p_attribute has ~ 170k and

Re: [sqlite] Out of memory error for SELECT char();

2014-03-08 Thread Simon Slavin
On 8 Mar 2014, at 6:25pm, Zsbán Ambrus wrote: > In the sqlite3 console, the following very simple statement gives > "Error: out of memory": > > SELECT char(); > > I think this is a bug. 162:~ simon$ sqlite3 ~/Desktop/test.sqlite SQLite version 3.7.13 2012-07-17 17:46:21

Re: [sqlite] Making string changes in a table

2014-03-09 Thread Simon Slavin
On 9 Mar 2014, at 10:05pm, Tim Streater wrote: > I have a table with one column containing file paths, such as /path/to/file > and /path/to/my/otherfile. Now I want to change all entries where the path > starts as /path/to/ to /path/from/. Getting a candidate list is

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

2014-03-09 Thread Simon Slavin
On 10 Mar 2014, at 1:38am, Stephen Chrzanowski wrote: > Apologies for the interruption and sort of off topic, but, is .timer part > of the CLI only or is it part of the SQL language? Can I get the result of > a timer from a call, or do I have to put a wrapper on my

Re: [sqlite] table and view select difference in C api sqlite3_column_name result

2014-03-10 Thread Simon Slavin
On 10 Mar 2014, at 11:57am, Stephan Beal wrote: > The remaining questions: > > - How are view selects handled differently than table selects? > - If so, then what is the reasoning behind it? > > This is not explained, but it's quite possibly that way so that the >

Re: [sqlite] How synchronize two databases

2014-03-10 Thread Simon Slavin
On 10 Mar 2014, at 12:58pm, Muhammad Bashir Al-Noimi wrote: > May I get some help from you guys? If you're asking how to synchronise two SQL databases which may have had different commands executed on them, then you should know that this is an unsolved problem which

Re: [sqlite] How synchronize two databases

2014-03-10 Thread Simon Slavin
On 10 Mar 2014, at 12:58pm, Adam Devita wrote: > Are the databases designed to allow you to perform such an operation easily? > > On the databases I do it with, I have designed in enough extra data in the > db and logic in my code to handle sorting out what to do (which

Re: [sqlite] SQLite on Windows Phone 8 fails on "VACUUM" command

2014-03-10 Thread Simon Slavin
On 11 Mar 2014, at 12:56am, Andrew Arnott wrote: > When I upgraded from the SQLite for WinPhone8 SDK v3.8.1 to 3.8.3.1, the > VACUUM statement quit working. Any idea why? What does it do instead of work ? Simon. ___

Re: [sqlite] Bug in sqlite? Can't read tables just after creating them

2014-03-11 Thread Simon Slavin
On 11 Mar 2014, at 11:31am, Fabrice Triboix wrote: > The problem is actually elsewhere. I changed the filesystem and it works > fine. > > So the problem is not with sqlite but with our special filesystem. Make sure your code tests the results returned by all API

Re: [sqlite] Exception when querying a range index

2014-03-11 Thread Simon Slavin
On 11 Mar 2014, at 11:06am, St. B. wrote: > There is one writing thread (every 5 minutes). The one writing thread > writes in the same database, but it is on a different table. Have you set a timeout for all your database handles (or just the one handle if they're all

Re: [sqlite] About Syntax Diagrams

2014-03-11 Thread Simon Slavin
On 11 Mar 2014, at 2:51am, yulea...@163.com wrote: > Hi, glad you had designed SQLite what a great open source software. > > Now I have a non-technical issues. The syntax diagrams for SQLite on your > SQLite website is so beautiful, and i want to draw one for myself but I do > not know

Re: [sqlite] very slow fdsync() calls

2014-03-11 Thread Simon Slavin
On 11 Mar 2014, at 12:20pm, Dan Kennedy wrote: > Or "PRAGMA locking_mode=EXCLUSIVE; PRAGMA journal_mode=PERSIST;", > if there will only ever be a single connection to the database. > > Or you could build with SQLITE_DISABLE_DIRSYNC, which omits all > syncs on

Re: [sqlite] Exception when querying a range index

2014-03-11 Thread Simon Slavin
On 11 Mar 2014, at 10:59pm, St. B. wrote: > So I updated to V1.0.91 of SDS, but now I get the following error at each > query run against the database : > SQLite error (1): no such table: sqlite_stat1 > > What should I do to get the table properly created? Open the

Re: [sqlite] Windows user app to display input form + reporting?

2014-03-12 Thread Simon Slavin
On 12 Mar 2014, at 11:00am, Gilles Ganault wrote: > I see that the wiki contains no document about GUIs: > www.sqlite.org/docs.html Because they're not SQLite. SQLite is the SQLite API, which is written for programmers to use. That's what the SQLite web site is

Re: [sqlite] Slow select from database

2014-03-12 Thread Simon Slavin
On 12 Mar 2014, at 10:38am, Георгий Жуйков wrote: > 1 . We have a database of measurements: time DATETIME, name TEXT, value > NUMERIC > indexes: > 'tags_name_index' ON 'TAGS' ('NAME' ASC) > 'tags_name_itemtime_index' ON 'TAGS' ('NAME' ASC ', ITEMTIME' ASC) > In

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread Simon Slavin
On 13 Mar 2014, at 9:27pm, Igor Tandetnik wrote: > On 3/13/2014 5:24 PM, veeresh kumar wrote: >> In a multi-threaded application, say a reader thread has read 100 records >> from the table and reading is still in progress before which writer thread >> writes data and tries

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread Simon Slavin
On 13 Mar 2014, at 11:12pm, veeresh kumar wrote: > Thanks a lot for the response. Is there any way to identify which > thread/process is actually blocking the reader thread or vise versa? Only in that it's the one that didn't get the error message. The one that's in the

Re: [sqlite] Sqlite lock granularity

2014-03-14 Thread Simon Slavin
On 14 Mar 2014, at 4:42pm, Sandu Buraga wrote: > For write operations the SQLite needs to lock the entire database file, > using WAL the granularity is improved and the locks are at table level. Is > it possible to get a better granularity, for example for a group of

Re: [sqlite] Acceptable growth of WAL file size?

2014-03-14 Thread Simon Slavin
On 14 Mar 2014, at 7:01pm, veeresh kumar wrote: > Query: > -- > I would like to understand if the WAL file size grows beyond 100 megabytes to > range say 500 to 900 megabytes, what would be the impact ?. > > - Is it just a read/write performance impact ? Or >

<    4   5   6   7   8   9   10   11   12   13   >