Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Ian Hardingham
Hey Igor, thanks for the reply. Is this O(1) ? Ian On 09/09/2011 13:21, Igor Tandetnik wrote: Ian Hardingham wrote: Again, I have: eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo FLOAT) with: CREATE INDEX IF NOT EXISTS eloResultScore ON eloResultTable (elo DESC) If

Re: [sqlite] SQLite Wiki doesn't work

2011-09-09 Thread Christopher Melen
Not an ideal solution, certainly, but if you know the name of the page you want, or maybe the subject, you should be able to use the Google cache to retrieve an older version of it. I had one of the wiki pages open in my browser which I hadn't looked at in a while, and just noticed it's unavail

Re: [sqlite] SQLite Wiki doesn't work

2011-09-09 Thread Antonio Maniero
It's a pity. Many searchs on Google landing on wiki. Antonio Maniero 2011/9/9 Duquette, William H (318K) > I believe that SQLite3 is being hosted using Fossil now, rather than > cvstrac; and I don't see a "Wiki" link on the main SQLite page. > > At a guess, the old Wiki pages have been migrate

Re: [sqlite] SQLite Wiki doesn't work

2011-09-09 Thread Duquette, William H (318K)
I believe that SQLite3 is being hosted using Fossil now, rather than cvstrac; and I don't see a "Wiki" link on the main SQLite page. At a guess, the old Wiki pages have been migrated to Fossil, but can now only be edited by the SQLite developers. If there are links to the old wiki anywhere, they

Re: [sqlite] SQLite Wiki doesn't work

2011-09-09 Thread Antonio Maniero
Still down since weeks ago. 2011/9/5 SQL Maestro Group > Hi! > > The "Wiki" link at the SQLite home page displays a blank page: > http://www.sqlite.org/cvstrac/**wiki > > Regards, > The SQL Maestro Group Team > http://www.sqlmaestro.com _

Re: [sqlite] Patch to pass collation through to Virtual Tables (The Patch Text)

2011-09-09 Thread Ben Harper
One liner diff -r 354a72d834e6 third_party/sqlite/sqlite3/where.c --- a/third_party/sqlite/sqlite3/where.cFri Sep 09 15:13:23 2011 +0200 +++ b/third_party/sqlite/sqlite3/where.cFri Sep 09 15:15:49 2011 +0200 @@ -1971,6 +1971,7 @@ pIdxCons[j].iColumn = pTerm->u.lef

[sqlite] Patch to pass collation through to Virtual Tables

2011-09-09 Thread Ben Harper
Hi, I have attached a one-liner (vtab-collation.patch) that sends collation information through to virtual tables. The bigger patch (vtab-collation-full.patch) illustrates the header file changes necessary to make this compile. Unfortunately, it's not as simple as just one line of code, since m

Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Simon Slavin
On 9 Sep 2011, at 1:47pm, Ian Hardingham wrote: > I really want O(1), but selecting by elo DESC and then setting a ranking > column for all records seems to be very slow, even during a transaction. Any > tips for doing that fast? If you're trying to collect this information for many different

Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Ian Hardingham
Thanks Igor. I really want O(1), but selecting by elo DESC and then setting a ranking column for all records seems to be very slow, even during a transaction. Any tips for doing that fast? Thanks, Ian On 09/09/2011 13:34, Igor Tandetnik wrote: Ian Hardingham wrote: Hey Igor, thanks for t

Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Igor Tandetnik
Ian Hardingham wrote: > Hey Igor, thanks for the reply. > > Is this O(1)? Or... I guess it's probably low-magnitude O(log n) ? It's O(n). There's no shortcut to count(*), it walks through and counts all the records satisfying the condition. A B-tree doesn't provide a fast way to obtain a numb

Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Ian Hardingham
Hey Igor, thanks for the reply. Is this O(1)? Or... I guess it's probably low-magnitude O(log n) ? Ian On 09/09/2011 13:21, Igor Tandetnik wrote: Ian Hardingham wrote: Again, I have: eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo FLOAT) with: CREATE INDEX IF NOT E

Re: [sqlite] Getting the location of a record in an Index

2011-09-09 Thread Igor Tandetnik
Ian Hardingham wrote: > Again, I have: > > eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo > FLOAT) > > with: > > CREATE INDEX IF NOT EXISTS eloResultScore ON eloResultTable (elo DESC) > > If I have the id of a row in eloResultTable, I wish to find how far down > the elo

[sqlite] Getting the location of a record in an Index

2011-09-09 Thread Ian Hardingham
Hey guys. (Thanks, I got my previous problem sorted). Again, I have: eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo FLOAT) with: CREATE INDEX IF NOT EXISTS eloResultScore ON eloResultTable (elo DESC) If I have the id of a row in eloResultTable, I wish to find how fa

Re: [sqlite] Implementing persistent queues in sqlite

2011-09-09 Thread Grice, Lynton (L)
Hi Allan, I have done this exact thing recently, I needed a "high speed" persistent queue in my one application running on SPARC. My application may have had some different requirements but essentially message stream from one system to the "SQLite queue" and get sent to another system(both dire

[sqlite] Implementing persistent queues in sqlite

2011-09-09 Thread Allan Nielsen
Hi Sqlite users After several frustrating days, i have decided to drop using BerkeleyDB for implementing a persistent queue, and new as an alternative I'm looking at sqlite. I have noticed that this topic have been discussed before on this list several time, but I'm asking again as I have some qu

[sqlite] LIKE operator on virtual table assumes ASCII collation

2011-09-09 Thread Ben Harper
>From xBestIndex and xFilter, there is no way to determine the intended >collation. The default collation for a field is binary. However, a LIKE operator needs an ASCII collation, and in the case of a virtual table, the constraints passed in to xBestIndex and xFilter assume an ASCII collation. H