[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Simon Slavin
On 15 Feb 2016, at 9:41pm, James K. Lowden wrote: > SQL Server has none of those restrictions, and probably keeps pace with > SQLite even on its home turf. But the administration of SQL Server is > nontrivial. For that reason alone, I would never use it in situations > where SQLite would do.

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Eric Sink
Just for fun: I know a friend who has a Ferrari. It is faster than my Ford F-150. Unless we are racing with both vehicles pulling a 7,000 pound trailer uphill. Then I would probably win. Thousand-mile trip? Take a sports car. Moving a couch a thousand miles? Use a pickup truck. SQLite is

[sqlite] s::[i] Why SQLite does not use a web-based forum?

2016-02-15 Thread Drago, William @ CSG - NARDA-MITEQ
Send your question to a mailing list and a large number of people see it right away. Discussion follows as quickly as email can be sent and rec'd. You get the answer to your question in the least possible time. Post your question on a web-based forum and it will take much longer for the same

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Scott Robison
On Mon, Feb 15, 2016 at 9:07 PM, Keith Medcalf wrote: > > On the other hand if you drive either on a road with a speed limit of 30 > miles per hour (and go the speed limit), they both go the same distance in > the same time. > > In other words, inquiring "which gets from one side of town to the

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread da...@andl.org
OK, I get it now. You need a whole query to calculate a value for val, and then another query to find the lowest distance match on val. You can't do that with simple correlated queries or subqueries, except by repeating a lot of the work. The only reasonable prospect I could see for efficiency

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Keith Medcalf
On the other hand if you drive either on a road with a speed limit of 30 miles per hour (and go the speed limit), they both go the same distance in the same time. In other words, inquiring "which gets from one side of town to the other" the fastest, a Ferrari or an F-150, is not dependent

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Simon Slavin
On 15 Feb 2016, at 8:58pm, James K. Lowden wrote: > Clemens Ladisch wrote: > >> I don't know why correlated subqueries cannot use values from the >> outer query in the ORDER BY or LIMIT clauses; > > ORDER BY is not part of SELECT! It's not a relational operator. > Per the SQL standard --

[sqlite] empty page corrupt

2016-02-15 Thread sanhua.zh
Yeah, but I don?t know how to debug it. I follow the howtocorrupt.html suggestion but nothing helpful. I write in Objective-C. all sqlite relative operation isencapsulated by Objective-C and thread mutex. ???:Simon Slavinslavins at bigfraud.org ???:SQLite mailing listsqlite-users at

[sqlite] empty page corrupt

2016-02-15 Thread sanhua.zh
I did it on iOS. I already checked the howtocorrupt.html, but I can?t find anything helpful. ???:Clemens Ladischclemens at ladisch.de ???:sqlite-userssqlite-users at mailinglists.sqlite.org :2016?2?15?(??)?18:42 ??:Re: [sqlite] empty page corrupt sanhua.zh wrote: I find some db

[sqlite] empty page corrupt

2016-02-15 Thread sanhua.zh
I find some db corrupted and try to find out the reason. After a simple analysis, I found that many of the db pages are empty, which means all bits in this page is zero. This is the reason causing sqlite report db corrupt. I don?t know why this happen, does someone have the same problem ever?

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Jim Callahan
SQLite would be most comparable to *SQL Server Express LocalDB* edition which is introduced in this July 2011 blog post https://blogs.msdn.microsoft.com/sqlexpress/2011/07/12/introducing-localdb-an-improved-sql-express/ More uptodate information about *SQL Server Express LocalDB* edition is in

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread James K. Lowden
On Mon, 15 Feb 2016 11:21:06 +0800 wrote: > I am just curious whether there is a performance comparison between > SQLite and SQL Server? Odds are you will never see a such a comparison published. If you read your SQL Server EULA, you'll see it specifically prohibits publishing benchmark

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread James K. Lowden
On Mon, 15 Feb 2016 08:56:35 +0100 Clemens Ladisch wrote: > I don't know why correlated subqueries cannot use values from the > outer query in the ORDER BY or LIMIT clauses; ORDER BY is not part of SELECT! It's not a relational operator. Per the SQL standard -- ORDER BY cannot appear in a

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread James K. Lowden
On Mon, 15 Feb 2016 10:39:31 +0100 Clemens Ladisch wrote: > > you need to explicitly limit a subquery that is a field and must > > only ever return 1 result if the where clause is ambiguous about it > > Not in SQLite. (It ignores superfluous rows, and returns NULL if > there are no rows.)

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Dan Kennedy
On 02/15/2016 02:56 PM, Clemens Ladisch wrote: > Gary Briggs wrote: >>> SELECT >>>a.id AS a_id, >>>(SELECT b.id >>> FROM foo AS b >>> WHERE b.id!=a.id >>> AND distance(a.x,a.y,b.x,b.y)<=25 >>> ORDER BY b.val, distance(a.x,a.y,b.x,b.y)) >>> FROM foo AS a >> This is the bit

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Keith Medcalf
Pretty sure you meant: select * from (select min(t) as t from T) as T; adding a group by will return the minimum value of T for each group of T which is equivalent to select distinct T from T min(t) group by t, max(t) group by t, avg(t) group by t, distinct t all return the same results. >

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Scott Robison
On Mon, Feb 15, 2016 at 2:05 PM, Simon Slavin wrote: > > On 15 Feb 2016, at 8:58pm, James K. Lowden > wrote: > > > Clemens Ladisch wrote: > > > >> I don't know why correlated subqueries cannot use values from the > >> outer query in the ORDER BY or LIMIT clauses; > > > > ORDER BY is not part

[sqlite] empty page corrupt

2016-02-15 Thread Simon Slavin
On 15 Feb 2016, at 11:59am, sanhua.zh wrote: > I did it on iOS. > I already checked the howtocorrupt.html, but I can?t find anything helpful. This is almost always a result of hardware failure or programming error. SQLite does not corrupt databases that way. What language are you

[sqlite] empty page corrupt

2016-02-15 Thread Clemens Ladisch
sanhua.zh wrote: > I find some db corrupted and try to find out the reason. Are you using a network file system or virtual machine? What type of disk? http://www.sqlite.org/howtocorrupt.html Regards, Clemens

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Gary Briggs
On Mon, Feb 15, 2016 at 08:56:35AM +0100, Clemens Ladisch wrote: > Gary Briggs wrote: > >> SELECT > >> a.id AS a_id, > >> (SELECT b.id > >>FROM foo AS b > >>WHERE b.id!=a.id > >> AND distance(a.x,a.y,b.x,b.y)<=25 > >>ORDER BY b.val, distance(a.x,a.y,b.x,b.y)) > >> FROM foo AS

[sqlite] applyng schema changes to several databases

2016-02-15 Thread R Smith
On 2016/02/15 11:01 AM, Luca Ferrari wrote: > Hi all, > this could sound trivial but I've got a few hundreds SQLite 3 database > files, all with the same schema, that I need to alter adding a few > columns here and there. > While I'm pretty sure a simple sheel script that will execute, file >

[sqlite] query Benchmark

2016-02-15 Thread Eduardo Morras
On Mon, 15 Feb 2016 10:57:29 +0100 Michele Pradella wrote: > Sorry you are right, the test I did was with % not with a *just a > cut and paste error > Anyway it's tricky because I have to tell sqlite which index to use > in LIKE to fast search but I do not have to tell the index if start >

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread ad...@shuling.net
Hi, I am just curious whether there is a performance comparison between SQLite and SQL Server? Surely SQL Server will perform better on huge database with thousands of tables(more than 10GB size). But whether SQLite will perform better on smaller database such as one database with one table that

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread da...@andl.org
Why not SELECT foo.*, (SELECT id, DIST(foo.x, foo.y, nearest.x, nearest.y) AS d FROM foo AS nearest WHERE d < 25 ORDER BY val, d LIMIT 1) AS id2 FROM foo Regards David M Bennett FACS Andl - A New Database Language - andl.org -Original Message- From:

[sqlite] query Benchmark

2016-02-15 Thread Michele Pradella
Anyway thank you Simon the point of view it's clear now Selea s.r.l. Michele Pradella R SELEA s.r.l. Via Aldo Moro 69 Italy - 46019 Cicognara (MN) Tel +39 0375 889091 Fax +39 0375 889080 *michele.pradella at selea.com*

[sqlite] query Benchmark

2016-02-15 Thread Michele Pradella
Sorry you are right, the test I did was with % not with a *just a cut and paste error Anyway it's tricky because I have to tell sqlite which index to use in LIKE to fast search but I do not have to tell the index if start with % or _ because otherwise the query is not executed.. I'll handle

[sqlite] query Benchmark

2016-02-15 Thread Michele Pradella
Probably is documented so I'm going to read carefully, anyway if you do this CREATE TABLE car_plates (Id INTEGER PRIMARY KEY AUTOINCREMENT,FileName VARCHAR(255),Plate VARCHAR(255)); CREATE INDEX car_plates_plate on car_plates(Plate); PRAGMA case_sensitive_like=ON; explain query plan SELECT *

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Clemens Ladisch
R Smith wrote: > you need to alias a subquery always when it is used in a join Not in SQLite. > you need to explicitly limit a subquery that is a field and must only > ever return 1 result if the where clause is ambiguous about it Not in SQLite. (It ignores superfluous rows, and returns NULL

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread R Smith
On 2016/02/15 3:01 AM, Gary Briggs wrote: > > This is the bit that doesn't seem to work; having > distance(a.x,a.y,b.x,b.y) in the ORDER BY clause on the inner query is > what appears to cause the error that it can't find a.x, from the outer query. > > It's not tied to it being a custom

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread R Smith
On 2016/02/15 5:21 AM, admin at shuling.net wrote: > Hi, > > I am just curious whether there is a performance comparison between SQLite > and SQL Server? Surely SQL Server will perform better on huge database with > thousands of tables(more than 10GB size). But whether SQLite will perform >

[sqlite] Why SQLite does not use a web-based forum?

2016-02-15 Thread Tim Streater
On 15 Feb 2016 at 01:19, admin at shuling.net wrote: > Why SQLite does not utilize a web-based forum for all users discuss > problems? I think that will be more convenient and can help more people. Anyone using SQLite should be able to cope with a mailing list. A list such as this is much

[sqlite] query Benchmark

2016-02-15 Thread Swithun Crowe
Hello MP> Anyway it's tricky because I have to tell sqlite which index to use in MP> LIKE to fast search but I do not have to tell the index if start with MP> % or _ because otherwise the query is not executed.. I'll handle it... I'm not sure if other people have suggested it already, but you

[sqlite] applyng schema changes to several databases

2016-02-15 Thread Luca Ferrari
Hi all, this could sound trivial but I've got a few hundreds SQLite 3 database files, all with the same schema, that I need to alter adding a few columns here and there. While I'm pretty sure a simple sheel script that will execute, file per file, the alter table (within a transaction) will do the

[sqlite] query Benchmark

2016-02-15 Thread Simon Slavin
On 15 Feb 2016, at 9:42am, Michele Pradella wrote: > CREATE TABLE car_plates (Id INTEGER PRIMARY KEY AUTOINCREMENT,FileName > VARCHAR(255),Plate VARCHAR(255)); > CREATE INDEX car_plates_plate on car_plates(Plate); > PRAGMA case_sensitive_like=ON; > > explain query plan SELECT * FROM

[sqlite] Why SQLite does not use a web-based forum?

2016-02-15 Thread ad...@shuling.net
Hi, Why SQLite does not utilize a web-based forum for all users discuss problems? I think that will be more convenient and can help more people. Thanks

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Clemens Ladisch
admin at shuling.net wrote: > I am just curious whether there is a performance comparison between SQLite > and SQL Server? That depends on the data, and the software, and the hardware. In other way: you have to measure yourself. > Surely SQL Server will perform better on huge database with

[sqlite] Correlated subquery throwing an error

2016-02-15 Thread Clemens Ladisch
Gary Briggs wrote: >> SELECT >> a.id AS a_id, >> (SELECT b.id >>FROM foo AS b >>WHERE b.id!=a.id >> AND distance(a.x,a.y,b.x,b.y)<=25 >>ORDER BY b.val, distance(a.x,a.y,b.x,b.y)) >> FROM foo AS a > > This is the bit that doesn't seem to work; having > distance(a.x,a.y,b.x,b.y)

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Rob Willett
To add to the responses, we use SQLite for our main database which is currently around 60GB in size, so size isn?t an issue for SQLite. I am aware of other people with far, far larger SQLite databases. We did a quick test and ran up to a couple of hundred DB?s of data in SQLIte and it seemed

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Donald Shepherd
They're intended for fundamentally different uses. It's like asking what's more energy efficient for cooking dinner - a wok or an oven. On Mon, 15 Feb 2016 at 14:21 wrote: > Hi, > > I am just curious whether there is a performance comparison between SQLite > and SQL Server? Surely SQL Server

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Warren Young
On Feb 15, 2016, at 1:02 AM, Clemens Ladisch wrote: > > SQLite uses a much simpler locking scheme that can be faster if there > aren't concurrent accesses. SQL Server has higher concurrency. SQLite also doesn?t have the IPC overhead of a client/server DBMS, so if you don?t need concurrency or

[sqlite] Why SQLite does not use a web-based forum?

2016-02-15 Thread Simon Slavin
On 15 Feb 2016, at 1:19am, admin at shuling.net wrote: > Hi, > > Why SQLite does not utilize a web-based forum for all users discuss > problems? I think that will be more convenient and can help more people. You can access this mailing list using Nabble: