Re: [sqlite] SQLite question

2011-04-10 Thread Simon Slavin
On 11 Apr 2011, at 3:59am, Guilherme wrote: > Well, I thought that if the execution followed a plan.. I could get for > example, the cardinality from the results until a point, say a join. > Imagine a query with 15 joins.. the execution would make a join, than, with > the results from this join,

Re: [sqlite] SQLite question

2011-04-10 Thread Igor Tandetnik
Guilherme wrote: > Well, I thought that if the execution followed a plan.. I could get for > example, the cardinality from the results until a point, say a join. I don't see how the conclusion follows from the premise. Why does "follows execution plan" have to imply "provides ready access to the

Re: [sqlite] SQLite question

2011-04-10 Thread Igor Tandetnik
Guilherme wrote: > I believed that databases in general evaluate their queries, following a > execution plan... > e.g. first do a table scan and apply a filter from the where clause.. than > use the results to execute a join with other table.. than use the results to > excute with another join.. >

[sqlite] SQLite question

2011-04-10 Thread Guilherme
Hi! I believed that databases in general evaluate their queries, following a execution plan... e.g. first do a table scan and apply a filter from the where clause.. than use the results to execute a join with other table.. than use the results to excute with another join.. but now, from what I've

Re: [sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Pavel Ivanov
Apparently you're writing to the sqlite-users mailing list but don't read all answers that people give writing to the same mailing list - people usually do not reply to you directly and I'd appreciate if you didn't reply to me directly too. Write to the list and read from the list. Pavel On Thu,

Re: [sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Pavel Ivanov
What's wrong with the link already given you in another thread? http://www.sqlite.org/backup.html Also see http://www.sqlite.org/c3ref/backup_finish.html. Pavel On Thu, Jan 28, 2010 at 9:43 AM, Trapper Schuler wrote: > Hello, > > Is there a SQLite function that can "copy" one database to anothe

[sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Trapper Schuler
Hello, Is there a SQLite function that can "copy" one database to another (programmatically)? I would imagine that there would be a function that could take a "From" handle and a "To" handle that could copy an entire database. A "duplicate" function should work for me as well if there is no "cop

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Kees Nuyt
On Wed, 27 Jan 2010 23:20:01 -0500, Trapper Schuler wrote: >Hello, > >I am new to SQLite, but have experience with other database management >systems. Performance is very critical in my application, but the data >is getting too large to keep in memory. My application is not just a >database

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Igor Tandetnik
Trapper Schuler wrote: > If I use a "Temporary Database" or an "In-Memory Database", is there an > easy way to take that database and write it to disk http://www.sqlite.org/backup.html Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.or

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Pavel Ivanov
I can't see all your requirements for this database but I believe you'd better not use temporary or in-memory databases. You'd better use regular database but use all kinds of tricks to speed up work with it (like "pragma synchronous off", "pragma journal_mode off", in some cases some tricks can be

[sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Trapper Schuler
Hello, I am new to SQLite, but have experience with other database management systems. Performance is very critical in my application, but the data is getting too large to keep in memory. My application is not just a database front end. The database is just a part of the overall application.

Re: [sqlite] SQLite: question

2009-10-27 Thread Keith Roberts
On Tue, 27 Oct 2009, Ken wrote: > To: General Discussion of SQLite Database > From: Ken > Subject: Re: [sqlite] SQLite: question > > > Sql uses a single quote or a tick mark to delimit strings. > C, C++ and other languages use Dobule quote to delimit > strings. >

Re: [sqlite] SQLite: question

2009-10-27 Thread Ken
ipp > Subject: Re: [sqlite] SQLite: question > To: "General Discussion of SQLite Database" > Cc: "Sergiu _" > Date: Tuesday, October 27, 2009, 7:56 AM > Question forwarded to the > sqlite-users mailing list. > > Quick answer:  String are quoted in SQL using si

Re: [sqlite] SQLite: question

2009-10-27 Thread D. Richard Hipp
Question forwarded to the sqlite-users mailing list. Quick answer: String are quoted in SQL using single quotes, not double-quotes. What you are seeing is not a bug. You are misusing the string quoting mechanism. On Oct 27, 2009, at 8:51 AM, Sergiu _ wrote: > Hello, > > I use SQLite in on

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 7:44 AM, Yuzem wrote: > > > > P Kishor-3 wrote: >> Google for "normalizing a database" and then read up on it. It will help. >> > > Ok, thanks, thats the solution. Now there is another problem that arise. > Lets say I have a table called movies with 3 columns (id, titles, k

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-24 Thread Yuzem
P Kishor-3 wrote: > Google for "normalizing a database" and then read up on it. It will help. > Ok, thanks, thats the solution. Now there is another problem that arise. Lets say I have a table called movies with 3 columns (id, titles, keywords): 1|title1|keyword1 1|title1|keyword2 1|title1|k

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-23 Thread P Kishor
On Mon, Feb 23, 2009 at 5:15 AM, Yuzem wrote: > > Thanks for the answer. > > Igor Tandetnik wrote: >> This monstrosity gives the correct answer in your specific example, but >> it relies on there being exactly two tags per folder. > It can be any number of tags per folder. > > Igor Tandetnik wrote

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-23 Thread Yuzem
Thanks for the answer. Igor Tandetnik wrote: > This monstrosity gives the correct answer in your specific example, but > it relies on there being exactly two tags per folder. It can be any number of tags per folder. Igor Tandetnik wrote: > > Consider normalizing your database. Split into two t

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-22 Thread Igor Tandetnik
"Yuzem" wrote in message news:22153722.p...@talk.nabble.com > Suppose that have 2 columns: folders and tags: > ~/Music|classic,rock > ~/Music|classic,rock > ~/Pictures|art,photos > ~/Pictures|art,photos > ~/Pictures|art,photos > > To know the folder count I do: > sqlite3 test.db "select folder, c

[sqlite] Sqlite question: group by column with multiple tags?

2009-02-22 Thread Yuzem
Suppose that have 2 columns: folders and tags: ~/Music|classic,rock ~/Music|classic,rock ~/Pictures|art,photos ~/Pictures|art,photos ~/Pictures|art,photos To know the folder count I do: sqlite3 test.db "select folder, count(folders) from t1 group by folder" Returns: ~/Music|2 ~/Pictures|3 How

Re: [sqlite] Sqlite question---->how to impose order on query

2008-04-11 Thread Jay A. Kreibich
On Thu, Apr 10, 2008 at 09:56:31PM -0500, Dewey Gaedcke scratched on the wall: > Set @a = 0; > Select T1.rownumber, T1.Col2 from > ( > Select @a:[EMAIL PROTECTED] as rownumber, Col1, Col2 > from Table where Col1 = 'abc' Order by Col1 > ) as T1 > Where T1.rownumber between 2

Re: [sqlite] Sqlite question---->how to impose order on query

2008-04-10 Thread Dewey Gaedcke
Dennis, Thanks for the info/link.if we must go this route (http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor), we will, but I'd much rather pay someone to write a simple embedded "sequence" function for us because we've got almost 10 (very complex) queries in mySQL that use the example in my

Re: [sqlite] Sqlite question---->how to impose order on query result for paging

2008-04-10 Thread Dennis Cote
Dewey Gaedcke wrote: > > For example, if my query returns 80 rows, I'd like an extra column holding > sequential values 1 to 80 to help with paging > Check out this information page http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor It explains how to do paging efficiently in SQLite. HTH De

[sqlite] Sqlite question---->how to impose order on query result for paging

2008-04-10 Thread Dewey Gaedcke
Hello, I hope this is the right place to get sqlite help. I'm trying to figure out how to generate a relative row # in a sqlite query result>(in native SQL if possible---I'm not a C++ guy). For example, if my query returns 80 rows, I'd like an extra column holding sequential values 1 to 80 to