Re: [sqlite] Use with asp.net

2012-05-30 Thread Larry Brasfield
On May 30, Mike wrote: On 5/29/12 12:02 PM, Mike wrote: > I'd like to use a SQLite db as a back end for asp.net web pages. Is > there information somewhere on how to deploy it and set it up? > > I gather I need to use system.data.sqlite.dll. That's the part I'm > most interested in. > > _

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Keith Medcalf
> And then I put all of those in one giant (almost: only about 15 columns) view > that the user can do arbitrary queries on, most of which only touch one or > two of those columns from C, and many of which touch zero. SQLite does not do query re-write. If you use a database engine that *does* do

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Yuriy Kaminskiy
Richard Hipp wrote: > On Wed, May 30, 2012 at 2:17 PM, Yuriy Kaminskiy wrote: > >> Pavel Ivanov wrote: >>> Here is an example when left outer join makes the difference. Example >>> could seem very artificial but SQLite should count on any possible >>> usage. >>> >>> sqlite> create table Employee

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 2:02:39 e.h. Igor Tandetnik wrote: > How about this. You create two views, say V1 and V2, one with the join > and one without. Take user-provided query, replace all occurences of V1 > with V2, and try to prepare the new query. If that succeeds, the new > query is synta

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Igor Tandetnik
On 5/30/2012 4:21 PM, Charles Samuels wrote: On Wednesday, May 30, 2012 1:10:17 e.h. Marc L. Allen wrote: Wouldn't it be easier to construct a couple of different views and then intelligently decide which view to use based on the user request? If I could determine which tables the user were in

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 1:51:54 e.h. Marc L. Allen wrote: > So, the user provides a standard SQL query using your composite view? Or > are they providing some other construct that you convert into a query > using your view? The user speaks SQL. Charles ___

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Marc L. Allen
>> All requirements are specific :) How do you pick at what point that overhead >> is too much? When the overhead outweighs the benefit.If, for example, you were the only person who ever needed that particular optimization, I would suggest that the overhead is too much. So, the user provid

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 1:10:17 e.h. Marc L. Allen wrote: > Wouldn't it be easier to construct a couple of different views and then > intelligently decide which view to use based on the user request? If I could determine which tables the user were interested in and then shift the view beneath

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Marc L. Allen
Sorry.. I've given up on bottom posting.. it's too much of a pain in Outlook. I see. Wouldn't it be easier to construct a couple of different views and then intelligently decide which view to use based on the user request? You have a specific requirement and you're wanting SQLite to add overhea

Re: [sqlite] Recovering data form an apparently corrupt .db

2012-05-30 Thread Simon Slavin
On 30 May 2012, at 8:11pm, Peter Blair wrote: > I need help finding resources to help me recover data from a .db file. > > The file would be disposable but it contains some memorable and hilarious > quotes from my 3 year old daughter that would break my heart to lose. > > It's a notes.db file

Re: [sqlite] Recovering data form an apparently corrupt .db

2012-05-30 Thread Pavel Ivanov
> Opening the file in a text editor, I can see much (maybe all?) of the > fragmented contents of the note, but opening the file in sqliteman (or > other applications), doesn't show any records for the note or associated > data. > > I'm assuming it's perhaps a broken index, missing a record in a rel

Re: [sqlite] Use with asp.net

2012-05-30 Thread Mike
On 5/29/12 12:02 PM, Mike wrote: I'd like to use a SQLite db as a back end for asp.net web pages. Is there information somewhere on how to deploy it and set it up? I gather I need to use system.data.sqlite.dll. That's the part I'm most interested in. _

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 12:03:02 e.h. Marc L. Allen wrote: > 1) The left outer join table is joined by a unique column AND > 2) No other data from the joined table is used in the query. > > Is that about right? Almost: add "recursively": I actually have it nested with *another join* with the

[sqlite] Recovering data form an apparently corrupt .db

2012-05-30 Thread Peter Blair
Hi All, I need help finding resources to help me recover data from a .db file. The file would be disposable but it contains some memorable and hilarious quotes from my 3 year old daughter that would break my heart to lose. It's a notes.db file from the iPhone Notes application. My apologies if t

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Marc L. Allen
So... you're suggesting the optimizer discard a left outer join when: 1) The left outer join table is joined by a unique column AND 2) No other data from the joined table is used in the query. Is that about right? Out of curiosity, why is code being written like the SQL you're providing? Is it

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 11:29:00 f.h. Black, Michael (IS) wrote: > Since you have a one-to-one relationship I'm not sure why you don't just > put the inseam with the Employee, but perhaps you're just giving an > example here. It is an example. > > I would do it this way which is going to run a

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Richard Hipp
On Wed, May 30, 2012 at 2:17 PM, Yuriy Kaminskiy wrote: > Pavel Ivanov wrote: > > Here is an example when left outer join makes the difference. Example > > could seem very artificial but SQLite should count on any possible > > usage. > > > > sqlite> create table Employee (name int); > > sqlite> c

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Yuriy Kaminskiy
Pavel Ivanov wrote: > Here is an example when left outer join makes the difference. Example > could seem very artificial but SQLite should count on any possible > usage. > > sqlite> create table Employee (name int); > sqlite> create table Uniform (employeename, inseam, constraint ue > unique (empl

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Black, Michael (IS)
Since you have a one-to-one relationship I'm not sure why you don't just put the inseam with the Employee, but perhaps you're just giving an example here. I would do it this way which is going to run a heck of lot faster than using string compares as you are doing. pragma foreign_keys = on; cre

Re: [sqlite] Announcement: DRH to be in Munich, Germany July 3rd, 2012

2012-05-30 Thread Stephan Beal
A reminder... see the post below. PS: we still have plenty of space for any of you who might be interested in joining us. Please respond by the middle of June (not to the mailing list - see below!), if possible, so that i can make final arrangements for the meeting space. On Tue, May 15, 2012 at

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Pavel Ivanov
Here is an example when left outer join makes the difference. Example could seem very artificial but SQLite should count on any possible usage. sqlite> create table Employee (name int); sqlite> create table Uniform (employeename, inseam, constraint ue unique (employeename)); sqlite> insert into em

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Igor Tandetnik
On 5/30/2012 1:05 PM, Charles Samuels wrote: "A planned feature" refers to a feature that does not yet exist. I am asking if sqlite will ever be able to do this optimization? Well, I'm not developing SQLite, I'm just a user like yourself. In the remote case you are interested in my personal op

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Simon Slavin
On 30 May 2012, at 6:15pm, Charles Samuels wrote: > sqlite> select Name from Employee left outer join Uniform on > Employee.name=Uniform.employeename; > Joe > Steve > Eric > Dave > sqlite> explain query plan select Name from Employee left outer join Uniform > on Employee.name=Uniform.employeen

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 10:14:22 f.h. Charles Samuels wrote: > sqlite> select Name from Employee join Uniform on > Employee.name=Uniform.employeename; > Joe > Dave > sqlite> explain query plan select Name from Employee join Uniform on > Employee.name=Uniform.employeename; > 0|0|0|SCAN TABLE Em

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 10:02:24 f.h. Igor Tandetnik wrote: > On 5/29/2012 8:21 PM, Charles Samuels wrote: > > Suppose you have a query like this: > > > > select Employee.name from Employees left join Uniform on > > > > (EmployeeSize.name=Uniform.employeeName) > > Doesn't look like a vali

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Charles Samuels
On Wednesday, May 30, 2012 9:45:16 f.h. David Bicking wrote: > If Uniform has a given EmployeeName twice, you will get the Employee.Name > twice in this query. Thus it would be a different result than if you did > not join with Uniform. On Wednesday, May 30, 2012 9:57:00 f.h. Petite Abeille wrote:

[sqlite] System.Data.SQLite and Custom UDF

2012-05-30 Thread Damien
Hi, I am writing a SQLite extenstion for the Phalanger project ( http://www.php-compiler.net/). I have started using the System.Data.SQLite assembly, but I'm stuck with UDF... I have looked the source code of the assembly, and the way it is implemented will not work in my case. As far as I have

[sqlite] 2nd Call For Papers, 19th Annual Tcl/Tk Conference 2012

2012-05-30 Thread Andreas Kupries
[[ Notes: Colin Walker of F5 is confirmed as our Keynote speaker. http://www.f5.com ]] 19th Annual Tcl/Tk Conference (Tcl'2012) http://www.tcl.tk/community/tcl2012/ November 12 - 16, 2012 Holiday Inn Chicago Mart Plaza 350 West Mart Center Drive Chicago, Illinois, USA Important Dates: A

Re: [sqlite] Why can't sqlite disregard unused outer joins?

2012-05-30 Thread Petite Abeille
On May 30, 2012, at 2:21 AM, Charles Samuels wrote: > This query's result should be identical weather or not we have that join; > it's > an outer join, not an inner join, afterall. The outer join could affect the cardinality of the result (i.e. there could be multiple rows matching the drivi

[sqlite] System.Data.SQLite

2012-05-30 Thread info
Hello, I installed System.Data.SQLite (1.80) to my system. The testprogram runs fine. When putting the reference into VS Studio 2008 it takes an error: reference can´t be found. I copied the dll in several directories in my program without success. I tried all the things I know but I can´t

[sqlite] SQLITE_OPEN_CREATE required by named memory database?

2012-05-30 Thread Ralf Junker
Testing SQLite Fossil [0abdc2903d], sqlite_open_v2() returns SQLITE_PERM when trying to open a named memory database if the flag SQLITE_OPEN_CREATE is not passed. This is in contrast to unnamed memory databases. Is this intentional? Basic C code below demonstrates the issue. Ralf -