Re: [sqlite] I'm sorry to ask this, but I fear I must

2011-06-14 Thread Kevin Benson
2011/6/15 سليمان مصطفى > Hi, I'm sorry to ask this as I'm confident that it has been answered > before. what does SQLITE_OPEN_PRIVATECACHE do exactly? > > http://www.sqlite.org/c3ref/open.html The SQLITE_OPEN_PRIVATECACHEflag causes the databas

[sqlite] I'm sorry to ask this, but I fear I must

2011-06-14 Thread سليمان مصطفى
Hi, I'm sorry to ask this as I'm confident that it has been answered before. what does SQLITE_OPEN_PRIVATECACHE do exactly? I've searched the faq section as well as evey singe page I could think of with no success. Thank you in advance for your help. ___

Re: [sqlite] Howto get string from pragma command

2011-06-14 Thread Simon Slavin
On 15 Jun 2011, at 5:08am, J Decker wrote: > then it should return something other than SQLITE_DONE? > > On Tue, Jun 14, 2011 at 7:24 PM, Simon Slavin wrote: >> >> On 15 Jun 2011, at 3:12am, J Decker wrote: >> >>> How do I get the string after issuing a PRAGMA ? >> >> Pretend you were issuin

Re: [sqlite] Howto get string from pragma command

2011-06-14 Thread J Decker
then it should return something other than SQLITE_DONE? On Tue, Jun 14, 2011 at 7:24 PM, Simon Slavin wrote: > > On 15 Jun 2011, at 3:12am, J Decker wrote: > >> How do I get the string after issuing a PRAGMA ? > > Pretend you were issuing a SELECT command, and retrieve the table it would > retur

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Simon Slavin
On 15 Jun 2011, at 4:55am, Hoang Linh Duong wrote: > It is a good idea to divide into a sector. I will try that. But according to > your suggestion, using LIKE is not advisable, since if i create an index > (category, sector), this index will not be applicable for LIKE. I am not sure whether wit

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Hoang Linh Duong
It is a good idea to divide into a sector. I will try that. But according to your suggestion, using LIKE is not advisable, since if i create an index (category, sector), this index will not be applicable for LIKE. Thanks. On Wed, Jun 15, 2011 at 11:35 AM, Simon Slavin wrote: > > On 15 Jun 2011,

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Simon Slavin
On 15 Jun 2011, at 3:56am, Hoang Linh Duong wrote: > I have tried R-Tree, the execution time is even longer. > > For a trigger to calculate the distance, is it too much a burden if the > query is executed very frequently (the table Location is of more than 600k > records). I suspect that it may

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Hoang Linh Duong
I have tried R-Tree, the execution time is even longer. For a trigger to calculate the distance, is it too much a burden if the query is executed very frequently (the table Location is of more than 600k records). I suspect that it may take even longer time if we need to do update & query. After t

Re: [sqlite] Howto get string from pragma command

2011-06-14 Thread Simon Slavin
On 15 Jun 2011, at 3:12am, J Decker wrote: > How do I get the string after issuing a PRAGMA ? Pretend you were issuing a SELECT command, and retrieve the table it would return. Most pragmas just return a single-row single-column table. Simon. ___ s

[sqlite] Howto get string from pragma command

2011-06-14 Thread J Decker
How do I get the string after issuing a PRAGMA ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Small documentation error on PRAGMA page.

2011-06-14 Thread Andrew Sigmund
Looking up information for the user_version PRAGMA, I noticed that on the page http://www.sqlite.org/pragma.html the link to user_version, http://www.sqlite.org/pragma.html#pragma_user_version , doesn't work -- it leaves me at the top of the page. So I scroll to the bottom of the alphabetical list

Re: [sqlite] How to parse VIEW fields definitions?

2011-06-14 Thread Alexey Pechnikov
The new PRAGMA or Virtual Table will be more useful. But I don't sure about possibility of this. 2011/6/14 Nico Williams : > On Tue, Jun 14, 2011 at 1:58 PM, Alexey Pechnikov > wrote: >> As example, we have view: >> >> create view vtest as select name1 || ' ' || name2 as name from test; >> >> How

Re: [sqlite] How to parse VIEW fields definitions?

2011-06-14 Thread Nico Williams
On Tue, Jun 14, 2011 at 1:58 PM, Alexey Pechnikov wrote: > As example, we have view: > > create view vtest as select name1 || ' ' || name2 as name from test; > > How to get the definition of "name" field (will be "name1 || ' ' || > name2")? Of cource, the view can be more complex. Take Lemon and

[sqlite] How to parse VIEW fields definitions?

2011-06-14 Thread Alexey Pechnikov
As example, we have view: create view vtest as select name1 || ' ' || name2 as name from test; How to get the definition of "name" field (will be "name1 || ' ' || name2")? Of cource, the view can be more complex. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ _

[sqlite] sqlite seems to hang while indexing

2011-06-14 Thread Rense Corten
Hi list, I was trying to create an index on an integer column in a very large table with over 400,000,000 rows on an Ubuntu server, 8-core opteron 2384, 32 Gb RAM. After a couple of days, the process was still running and nothing seemed to happen. At first, sqlite uses a lot of cpu and more and mo

Re: [sqlite] Version 1.0.73.0

2011-06-14 Thread Harry Green
OK, I think I misread that ! I was reading the navigation to SQLite.Net\bin\Designer as being a *workround* for the temporary absence of the design time installer, but on second glance I conclude that it is only describing how to do something that is not yet implemented. So, what should I do i

Re: [sqlite] SQLite Backup and log files format

2011-06-14 Thread Simon Slavin
On 14 Jun 2011, at 4:13pm, Tahora H.Nazer wrote: > thanks for your answer Simon, could you please tell me file extensions of DB > and also log files? SQLite lets you pick your own file name, including the extension. Many people use '.sqlite' but I have seen even '.db' or no extension at all.

Re: [sqlite] SQLite Backup and log files format

2011-06-14 Thread Tahora H.Nazer
thanks for your answer Simon, could you please tell me file extensions of DB and also log files? --- On Tue, 6/14/11, Simon Slavin wrote: From: Simon Slavin Subject: Re: [sqlite] SQLite Backup and log files format To: "General Discussion of SQLite Database" Date: Tuesday, June 14, 2011, 8:00 A

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Jim Morris
You might also consider a trigger to calculate the distance once on insert/update. They you could use an index. On 6/14/2011 4:53 AM, Simon Slavin wrote: > On 14 Jun 2011, at 12:11pm, Martin.Engelschalk wrote: > >> make sure you have an index on category and distance, like >> >> create index My

Re: [sqlite] Implementing busy-waiting on SQLite

2011-06-14 Thread BareFeetWare
On 13/06/2011, at 6:49 PM, Ian Hardingham wrote: > As was being discussed yesterday, I have four processes accessing the > same database file. When they perform an sqlite action, I wish them to > block if the DB is not available. SQLite does not block if it finds the > db busy or locked, it r

Re: [sqlite] Version 1.0.73.0

2011-06-14 Thread Drew Hohmann
Here's how to get sqlite installed. http://www.tsjensen.com/blog/2011/06/04/SQLite+On+Visual+Studio+2010+Setup+Instructions.aspx I wished they would fix the current installer. I was completely lost until the above blog was posted. Drew > I'm a new user trying *sqlite-dotnet-x86-1007300.exe*

Re: [sqlite] Multiple relations

2011-06-14 Thread BareFeetWare
On 14/06/2011, at 8:29 PM, Ian Hardingham wrote: > Guys, I have another DB design question. Have you implemented the normalisation we discussed before, yet, especially id integer primary key column for players? Otherwise, stop here. > I have 100 - 1 clients connected to my server. Is a cli

Re: [sqlite] Migration from GMDB to SQLite, any tips?

2011-06-14 Thread Simon Slavin
On 14 Jun 2011, at 12:32pm, michael munson wrote: > I have some software written in C that current uses GMDB as its backend > database but for a variety of reasons (speed and the fact that the GMDB > routinely gets corrupted if the software crashes) I would like to migrate > this to SQLite. > >

Re: [sqlite] SQLite Backup and log files format

2011-06-14 Thread Simon Slavin
On 14 Jun 2011, at 9:04am, Tahora H.Nazer wrote: > what is the format of the file that this DB make after doing a backup > operation? It is a normal SQLite database file, using the same format as a normal database. You could delete your usual database file, put the backup file in its place,

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Simon Slavin
On 14 Jun 2011, at 12:11pm, Martin.Engelschalk wrote: > make sure you have an index on category and distance, like > > create index MyIndex on Location (category, distance) Peter is calculating distance inside his SELECT, but I agree that an index on (category) is an excellent idea. The oth

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Hoang Linh Duong
I do have Index for category, but im wondering how to create index (category, distance) since distance is a new column created in a query. Thanks. On Tue, Jun 14, 2011 at 7:11 PM, Martin.Engelschalk < engelsch...@codeswift.com> wrote: > Hi, > > make sure you have an index on category and distan

[sqlite] Migration from GMDB to SQLite, any tips?

2011-06-14 Thread michael munson
I have some software written in C that current uses GMDB as its backend database but for a variety of reasons (speed and the fact that the GMDB routinely gets corrupted if the software crashes) I would like to migrate this to SQLite. Are there any tips or documents anyone would recommend beyond th

Re: [sqlite] ATTACH DATABASE .tables .schema ?

2011-06-14 Thread Amit Chaudhuri
I'm a huge fan of the command line tool. At work we use it extensively when prototyping. We're probably amongst the less technically sophisticated of users, so the ability to quickly script an approach using a few text files is something we value hugely. It's a great way of weaning people off spre

Re: [sqlite] SQLITE run slow

2011-06-14 Thread Martin.Engelschalk
Hi, make sure you have an index on category and distance, like create index MyIndex on Location (category, distance) Because many records fulfill the category=17 condition, and if database size is an issue, an index only on distance might help also. Martin Am 14.06.2011 13:01, schrieb Hoan

[sqlite] SQLITE run slow

2011-06-14 Thread Hoang Linh Duong
Hi all, I have one SQL as below: SELECT name, type, category, x, y, ((x-645529)*(x-645529) + (y-1494293)*(y-1494293)) AS distance, FROM Location WHERE category=17 ORDER BY distance LIMIT 100 I run this SQL to retrieve data from my SQLITE database and it takes more than 1 minutes. Noted that my p

[sqlite] Multiple relations

2011-06-14 Thread Ian Hardingham
Guys, I have another DB design question. I have 100 - 1 clients connected to my server. Each client has a status. Many clients are "watching" *one* other client, which means that any change in that client's status must immediately be sent to the watching clients. Estimates of numbers: -

[sqlite] SQLite Backup and log files format

2011-06-14 Thread Tahora H.Nazer
Hello what is the format of the file that this DB make after doing a backup operation? is it a ".db" file? is it human-readable? when we want to restore it, should we make a new DB and put the backup file data in it or SQLite has the ability to run sql queries on archive files?(like a normal DB