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

2014-03-03 Thread romtek
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? On Mon, Mar 3, 2014 at 8:44 PM, Simon Slavin wrote: > > On 4 Mar 2014, at 1:15am, romtek wrote: > > > I have a question based on my observatio

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

2014-03-03 Thread romtek
than 5400 RPM ones? On Mon, Mar 3, 2014 at 5:57 PM, Simon Slavin wrote: > > 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'

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

2014-03-03 Thread romtek
n, Mar 3, 2014 at 3:47 PM, RSmith wrote: > > On 2014/03/03 23:11, 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? >> > > No, what Simon is trying to point out is simply that

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

2014-03-03 Thread romtek
Simon, does a real disk have to be a rotating hard disk? Is there problem with SSDs as far as SQLite is concerned? On Mon, Mar 3, 2014 at 2:21 PM, Simon Slavin wrote: > > On 3 Mar 2014, at 6:03pm, L. Wood wrote: > > > _bind() on a prepared statement and execution of "INSERT" are taking 70% >

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

2014-03-02 Thread romtek
to control access to the DB file to prevent data corruption. On Sun, Mar 2, 2014 at 9:18 PM, Simon Slavin wrote: > > 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 sa

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

2014-03-02 Thread romtek
In case this gives somebody a clue, the server in question is on http://vps.net/. On Sun, Mar 2, 2014 at 8:14 PM, romtek wrote: > Hi, > > 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 a

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

2014-03-02 Thread romtek
Hi, 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 number of ops up to 200 -- with the similar results. Why is that?

Re: [sqlite] Graphic SQLite Client Tool

2014-02-13 Thread romtek
I'd recommend http://www.sqliteexpert.com/. I've been using it for years and like it. On Sun, Jan 26, 2014 at 5:08 AM, big stone wrote: > Hello sqlite-users, > > I'm looking for a Graphic SQLite Client Tool to equip a classroom of old > windows PC. > > So far, the best option I found is : >

[sqlite] When does SQLite DB file get locked?

2013-10-21 Thread romtek
Hi, I started writing this message and then read http://www.sqlite.org/lang_transaction.html, and I think I've gotten my answer, but I will ask the question to be absolutely certain, particularly when using SQLite with PHP (using PDO). Probably based on flawed understanding of how SQLite worked,

[sqlite] Copying a DB file that is being in use

2012-12-06 Thread romtek
Hi, A recent discussion of a reader/writer problematic situation has prompted me to ask the following question. While the database file is being written to, the data isn't ready to be used by readers, so that DB is locked. What happens if I initiate copying of this file (e.g., to back it up)? Is

Re: [sqlite] Bug in trigger: when comparing a value of an int column to a quoted value

2011-12-25 Thread romtek
Alexey, I am not clear about whether you reported my bug or yours. Do you mind giving me a link to it so that I could see if I need to report mine and let it go? On Sun, Dec 25, 2011 at 11:16 AM, Alexey Pechnikov wrote: > I think there are some problems with dynamic datatypes in sqlite. > This

Re: [sqlite] Bug in trigger: when comparing a value of an int column to a quoted value

2011-12-24 Thread romtek
So, you also think this is a bug? I will submit it to the SQLite bug database. On Wed, Dec 21, 2011 at 7:42 AM, Alexey Pechnikov wrote: > The problem can be fixed by variables bindings patch: > http://sqlite.mobigroup.ru/wiki?name=tclsqlite > I think, you can do same for you lang. > > -- > Best

Re: [sqlite] How about the way put a database of SQLite 3 beside web folder?

2011-12-20 Thread romtek
On Fri, Dec 16, 2011 at 8:31 AM, Simon Slavin wrote: > I would not advise putting it in a folder that you are serving to the web > since this would allow anyone browsing yourweb site to inspect the full > contents of the file. One could easily configure the server to *not* serve database files

Re: [sqlite] Strange behavior for timeouts in transactions

2011-12-20 Thread romtek
On Tue, Dec 20, 2011 at 6:08 AM, Simon Slavin wrote: > > First, there's more than one way of using SQLite3 from PHP.  There's also the > interface SQLite3:: which is a much thinner wrapper around the basic SQLite C > library.  I have no way of knowing what proportion of programmers use one > li

Re: [sqlite] Strange behavior for timeouts in transactions

2011-12-20 Thread romtek
On Mon, Dec 19, 2011 at 1:34 PM, Pavel Ivanov wrote: > > Yes, this is expected behavior. In this case transaction won't be able > to ever proceed because it can proceed only when writing transaction > in session 1 is committed but it cannot be committed until all reading > transactions are finishe

Re: [sqlite] Bug in trigger: when comparing a value of an int column to a quoted value

2011-12-19 Thread romtek
On Mon, Dec 19, 2011 at 11:23 PM, Roger Binns wrote: > > > On 19/12/11 20:31, romtek wrote: > > As you can see, isActive is declared as an integer in table2, > > > This type of thing worked for years with an older version of SQLite > > library > > Are you s

[sqlite] Bug in trigger: when comparing a value of an int column to a quoted value

2011-12-19 Thread romtek
Hi, I would like to know if I am dealing with a bug or a backward incompatible change that I am not aware of. Consider this example: CREATE TABLE [table2] ( [id] INTEGER NOT NULL ON CONFLICT FAIL PRIMARY KEY ON CONFLICT FAIL AUTOINCREMENT, [isActive] INTEGER NOT NULL ON CONFLICT FAIL DEFAULT

[sqlite] Performance of getting selected columns vs getting all columns

2011-05-21 Thread romtek
Hi, I used to think that getting selected fields from a relational DB is faster than getting all fields, so I used to carefully selected only those that I needed for a particular task. However, this is time-consuming (for a developer) and error prone. So, I've relaxed my rules on occasions. And al

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 10:00 PM, Roger Binns wrote: > On 05/15/2011 07:48 PM, romtek wrote: > > I was describing what I have to do during design time, which often > happens > > after a website has been launched and is operational. > > Huh? You launch and have a site in

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 10:05 PM, Nico Williams wrote: > Right, well, SQLite3 doesn't support renaming columns. Internally > SQLite3 only stores the CREATE statements for all schema elements > (plus actual b-trees for tables and indexes). Specifically SQLite3 > does not store schema elements in

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 5:22 PM, Simon Slavin wrote: > Yeah, you have to fake it by making a new table. You want support for more > ALTER TABLE variants. The proper way to do it would be to > > ALTER TABLE myTable ADD COLUMN dateAdded > UPDATE myTable SET dateAdded = date > ALTER TABLE myTable

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 5:27 PM, Roger Binns wrote: > Wanting to rename a column should be a rare thing since it is so rare. If > you are frequently renaming columns then your code will be very brittle. > > I was describing what I have to do during design time, which often happens after a websit

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 5:10 PM, Mr. Puneet Kishor wrote: > > > A table: > > > > id, eventName, date > > > > I want to rename date to dateAdded. > > > > > sqlite doesn't support changing the name of a table column (and, neither > you nor your user should be doing this -- there is something strange

Re: [sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
On Sun, May 15, 2011 at 4:39 PM, Simon Slavin wrote: > > On 15 May 2011, at 10:33pm, romtek wrote: > > > So, I am asking developers of SQLite to make it easy for tool developers > to > > offer the ability to rename attributes. > > The SQL specification does not u

[sqlite] Need to be able to rename attributes

2011-05-15 Thread romtek
Hi, SQLite probably was intended as an embedded database for standalone software. However, because of its promotion by PHP community, it's been used to power websites. I use it for that purpose too and prefer it over other SQL DB solutions (primary because it allows me to move/backup data from a s