Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-28 Thread Bertrand Mansion
Andrew Piskorski wrote: >On Sun, Dec 19, 2004 at 12:09:08PM +0100, Bertrand Mansion wrote: > >> For web applications (sqlite being now the default database for PHP5), >> COUNT(*) >> performance is more important than INSERTs and DELETEs performance. The >> obvious > >That sounds VERY much like a

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-21 Thread Andrew Piskorski
On Sun, Dec 19, 2004 at 12:09:08PM +0100, Bertrand Mansion wrote: > For web applications (sqlite being now the default database for PHP5), > COUNT(*) > performance is more important than INSERTs and DELETEs performance. The > obvious That sounds VERY much like a matter of opinion. I strongly s

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-21 Thread Bertrand Mansion
D. Richard Hipp wrote: >Kenneth McDonald wrote: >> >> This cannot be done efficiently (at least not elegantly) with >> explicit indexes. For example, let's say I'm using integer >> indexes to define the order, and I have a table with one >> million records. If I insert a new record halfway throug

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-15 Thread Andrew Piskorski
On Tue, Dec 14, 2004 at 09:16:35PM -0600, Kurt Welgehausen wrote: > > ...I'd like to use a table as a "pure" BTree ... > > If you mean a general multi-way B-Tree, I don't think > there's any practical way in SQL. If you can use a > binary tree, there are ways. The most convenient is > Joe Celko'

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-15 Thread D. Richard Hipp
Kenneth McDonald wrote: This cannot be done efficiently (at least not elegantly) with explicit indexes. For example, let's say I'm using integer indexes to define the order, and I have a table with one million records. If I insert a new record halfway through the table, then I have to update the in

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-15 Thread Hugh Gibson
> You might search the list archive and also try a > Google search on 'celko nested set' and 'adjacency > list' -- or even just 'sql tree'. Try also http://www.dbazine.com/tropashko4.shtml Hugh

Re: [sqlite] Any way of using an implicit BTree ordering in SQLite?

2004-12-14 Thread Kurt Welgehausen
> ...I'd like to use a table as a "pure" BTree ... If you mean a general multi-way B-Tree, I don't think there's any practical way in SQL. If you can use a binary tree, there are ways. The most convenient is Joe Celko's method, which he calls nested sets. The other design is usually called an a