[sqlite] Another query optimization question

2007-11-01 Thread Matthew Gertner
The following query: SELECT DISTINCT _Resource.ResourceType, _Resource.Id, _Resource.OwnerId, _Resource.Created, _Resource.Modified, _Resource.Name, _Resource.ParentId, _Resource.Version, _Resource.Description, _Resource.Creator, _File.Size, _File.MimeType, _File.OriginURI, _File.OriginMimeType,

Re: [sqlite] Query optimization

2007-10-31 Thread Matthew Gertner
Igor Tandetnik wrote: > > Reordering LEFT JOIN changes the meaning of the statement. You don't > want your DBMS to do that to you behind your back. Make sure you know > what you are doing, and that the reordered statement still does what > it's supposed to do. Again, (A LEFT JOIN B)

[sqlite] Query optimization

2007-10-31 Thread Matthew Gertner
I'm running the following query: SELECT DISTINCT _Resource.ResourceType, _Resource.Id, _Resource.OwnerId, _Resource.Created, _Resource.Modified, _Resource.Name, _Resource.ParentId, _Resource.Version, _Resource.Description, _Resource.Creator, _File.Size, _File.MimeType, _File.OriginURI,

Re: [sqlite] Creating tables with open statements

2006-04-03 Thread Matthew Gertner
Jay Sprenkle wrote: The SQLITE_SCHEMA case is handled in our code. But in this case, we are in the middle of iterating a statement. Can we prepare it again without "losing our place"? Is this the right action considering that we are getting a SQLITE_ERROR when executing the statement, not

Re: [sqlite] Creating tables with open statements

2006-03-31 Thread Matthew Gertner
Jay Sprenkle wrote: On 3/31/06, Matthew Gertner <[EMAIL PROTECTED]> wrote: Hi, I'm trying to detect changes in our application schema and update the corresponding database schema automatically, but only when the table in question is actually needed (i.e. a sort of on-demand schema

[sqlite] Creating tables with open statements

2006-03-31 Thread Matthew Gertner
Hi, I'm trying to detect changes in our application schema and update the corresponding database schema automatically, but only when the table in question is actually needed (i.e. a sort of on-demand schema update). The problem I'm having is when other statements are open when this occurs,

[sqlite] Legal characters for table/column/index names

2005-11-18 Thread Matthew Gertner
Hi, I wasn't able to find a definite statement about which characters are/aren't allowed in SQLite table, column and index names. Does such a reference exist? If not, can some enlighten me. What non-alphanumeric characters are permitted? Is full Unicode supported? Thanks, Matt

Re: [sqlite] Extracting database schema information

2005-08-08 Thread Matthew Gertner
Thanks, Will, that's exactly what I was looking for. Will Leshner wrote: On Aug 8, 2005, at 5:14 AM, Matthew Gertner wrote: I'm wondering if there is a way to get information about the format of tables in an existing Sqlite database. Specifically, I would like to get the list of columns