Re: [sqlite] which func could get the number of rows

2009-03-08 Thread liubin liu
Yes, sqlite3_get_table() is good to handle the mission. and I am always using it. but I found that the prefomance was a little weak. and so I want to get some other API to handle the same mission. Kees Nuyt wrote: > > On Sat, 7 Mar 2009 01:09:28 -0800 (PST), liubin liu > <7101...@sina.com>

Re: [sqlite] bad index selection?

2009-03-08 Thread Derek Scherger
On Sun, Mar 8, 2009 at 9:46 PM, Igor Tandetnik wrote: > When all columns in the SELECT come from the index, SQLite can get all > their values directly from the index and avoid reading actual table. So > it saves an index-to-table lookup. > Thanks, that helps. > Note also

Re: [sqlite] bad index selection?

2009-03-08 Thread Igor Tandetnik
"Derek Scherger" wrote in message news:e97446630903081908l51d3303x507f72865fde1...@mail.gmail.com > It seems like sqlite (3.6.6.2) chooses different indexes depending on > which columns are selected for *output* and I wonder whether this is > a bug? > > -- 1. selecting

Re: [sqlite] select statement - Need help

2009-03-08 Thread Igor Tandetnik
"Joanne Pham" wrote in message news:936179.87380...@web90307.mail.mud.yahoo.com > I have the folowing table which has the following data for example: > remoteId hostName lastUpdateTime > > So if I ran this statement below: > select * from table group by hostName having

Re: [sqlite] Why so much sqlite3_enable_shared_cache()

2009-03-08 Thread Marc SIBERT
Marc SIBERT a écrit : > Hi, > > I've a program made using gcc/C++ compiler (with Win32/dev-cpp) and an > ready-made sqlite3 lib using v3.5.6. > I try to optimize my code, and the gprof tool give me : > > Each sample counts as 0.01 seconds. > % cumulative self self total

Re: [sqlite] select statement - Need help

2009-03-08 Thread Joanne Pham
Thanks! I worked! Select remoteId, table.hostname, lastUpdateTime from table,         ( Select hostname, Max(lastUpdateTime) max_utime, count(*) cnt from table                group by hostName) host_max         where table.hostname = host_max.hostname                 and table.lastUpdateTime =

Re: [sqlite] select statement - Need help

2009-03-08 Thread Joanne Pham
It gave me the syntax error! JP From: "Adler, Eliedaat" To: General Discussion of SQLite Database Sent: Sunday, March 8, 2009 1:08:51 PM Subject: Re: [sqlite] select statement - Need help By side-effect the following

Re: [sqlite] select statement - Need help

2009-03-08 Thread Adler, Eliedaat
By side-effect the following statement should give those values: Select remoteId, hostName, max(lastUpdateTime) from (select * from table order by hostName, lastUpdateTime) Group by hostName having count(*) > 1 ; The outer select will return the last row processed by

[sqlite] select statement - Need help

2009-03-08 Thread Joanne Pham
Hi All, I have the folowing table which has the following data for example:     remoteId hostName        lastUpdateTime     1        host1    19     2   host111     3host2    22

Re: [sqlite] SQLite Transaction Rate and speed...

2009-03-08 Thread Roger Binns
Alexey Pechnikov wrote: > Do you have experimental results of SQLite performance on SSD? SSD doesn't have uniform performance like spinning disks. There are differences in the underlying block size, wear levelling, speed (SLC vs MLC), how smart the controller is, caching in SSD etc. This

Re: [sqlite] Set read-only mode

2009-03-08 Thread Roger Binns
Tom Spencer wrote: > I did actually think of chmodding the file with every connection. The sqlite3_open_v2 call does let you specify SQLITE_OPEN_READONLY. If your wrapper doesn't provide this then the simplest thing would be to update the wrapper. http://www.sqlite.org/c3ref/open.html

Re: [sqlite] Feature request: Report constraint name(s) in error message

2009-03-08 Thread Roger Binns
Ralf Junker wrote: > when a named constraint is violated, the name of the constraint which > actually failed is not included in the error message. There has been a ticket about this for over 3 years, and also includes a patch to fix it: http://www.sqlite.org/cvstrac/tktview?tn=1648 Roger

Re: [sqlite] tool to browse a sqlite database

2009-03-08 Thread RB Smissaert
OK, thanks to clarify that. There is no problem with the table SQLiteSpy.db3, so what difference in the files Word.db3 and SQLiteSpy.db3 could possibly explain this problem? I have reported this to Olaf and I am sure he will shed light on this. RBS -Original Message- From:

Re: [sqlite] tool to browse a sqlite database

2009-03-08 Thread Ralf Junker
RB Smissaert wrote: >What SQLite version produced the file World.db3? I am not 100% sure about the exact SQLite version which I used to create the original World.db3, but I am VACUUMing it regularly to bring it up to date with recent versions. So I expect it should be some version after 3.6.8.

Re: [sqlite] Set read-only mode

2009-03-08 Thread Tom Spencer
Thanks, Alexey! I'll experiment with this. On Sun, Mar 8, 2009 at 8:08 AM, Alexey Pechnikov wrote: > Hello! > >> I too am puzzled. Perhaps the app involves a web server accepting any >> bunch of text from anybody who knows the URL and just running the text >> as an SQL

Re: [sqlite] tool to browse a sqlite database

2009-03-08 Thread RB Smissaert
What SQLite version produced the file World.db3? I ask as my wrapper doesn't pick correctly the fields of a table. This is Olaf Schmidt's VB wrapper dhRichClient with SQLite 3.6.11. BTW, SQLiteSpy looks a very nice GUI tool. RBS -Original Message- From: sqlite-users-boun...@sqlite.org

[sqlite] FAQ on threading outdated

2009-03-08 Thread Florian Weimer
It seems to me that the FAQ entry on threading is outdated and should point to instead. Due to locking issues in concurrent, garbage-collected languages, last-resort finalization of statement and database objects has to happen in a separate finalization thread.

Re: [sqlite] SQLite Transaction Rate and speed...

2009-03-08 Thread Alexey Pechnikov
Hello! On Saturday 07 March 2009 01:59:13 Roger Binns wrote: > A transaction requires two syncs (ie requesting the drive write the data > to the metal and not return until it does).  On average each sync will > take a disk rotation so a 7200rpm drive maxes out at 60 transactions a > second.  If

Re: [sqlite] Set read-only mode

2009-03-08 Thread Alexey Pechnikov
Hello! > I too am puzzled. Perhaps the app involves a web server accepting any > bunch of text from anybody who knows the URL and just running the text > as an SQL query -- i.e. read-only is perceived to be a last-ditch > (only?) defence against an SQL injection attack. There is "authorizer"

[sqlite] Feature request: Report constraint name(s) in error message

2009-03-08 Thread Ralf Junker
Hi, when a named constraint is violated, the name of the constraint which actually failed is not included in the error message. Example 1: create table con ( a text constraint must_not_be_null not null); insert into con values (null); Returns error "con.a may not be null". Example

Re: [sqlite] change the limitation of attached databases through perl

2009-03-08 Thread baxy77bax
John Machin wrote: > > On 8/03/2009 9:02 AM, baxy77bax wrote: >> hi, >> >> i need help with attaching databases. in my last post i recived some >> valuable info on limitation of attached databases (Thanx !!). since i'm >> using perl (its DBI) all modifications like cache_size, max page number

Re: [sqlite] tool to browse a sqlite database

2009-03-08 Thread Ralf Junker
BareFeet wrote: >See a comparison of several GUI SQLite tools here: >http://www.tandb.com.au/sqlite/compare/?ml SQLiteSpy is missing from the list. It is available from http://www.yunqa.de SQLiteSpy is a Unicode SQLite3 database browser GUI for Win32. Features include: * Database at a