Re: [sqlite] Most appropriate Web based database? (Newbie)

2006-04-24 Thread Jim C. Nasby
On Mon, Apr 24, 2006 at 08:54:40PM -0400, Paul Malcher wrote: > On 4/24/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > > > Keep in mind, there's *WAY* more Windows users than Linux users; that > > doesn't mean Windows is a better OS. > > > Indeed also

Re: [sqlite] Sqlite inside MySQL as one of the pluggable "storage mechanisms" ?

2006-04-24 Thread Jim C. Nasby
ce there's a few applications that are difficult to get good performance out of with PostgreSQL. Website session tables that are constantly updated are one example. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] Most appropriate Web based database? (Newbie)

2006-04-24 Thread Jim C. Nasby
me can be said of MySQL. If you do decide to go with MySQL, at least do yourself a favor and use InnoDB and turn all the strict mode stuff on. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nas

Re: [sqlite] Re: concers about database size

2006-03-24 Thread Jim C. Nasby
much it helped you. (And indeed, how much different schemes helped you). -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] Re: concers about database size

2006-03-22 Thread Jim C. Nasby
you could at least get a win on single-person queries. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] Running App state in db?

2006-03-01 Thread Jim C. Nasby
the best bet is to put the 'resources' into a database and let it handle the locking... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] Running App state in db?

2006-03-01 Thread Jim C. Nasby
a and refresh it (or simply overwrite it). In doing so > your other applications would then see a new time stamp within the accepted > threshold range and so could now trust that data again. > > Wayne > > > "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: On

Re: [sqlite] Running App state in db?

2006-03-01 Thread Jim C. Nasby
databases won't like you leaving that transaction open a real long time, so it depends on what you're doing if this will work. I also don't know if SQLite cares about such things. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork:

Re: [sqlite] performance statistics

2006-03-01 Thread Jim C. Nasby
ot provide good performance. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] performance statistics

2006-03-01 Thread Jim C. Nasby
nnot modify or lock rows changed by other transactions after the serializable transaction began. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] performance statistics

2006-03-01 Thread Jim C. Nasby
mic update when > finished, if needed delete "processed" records. FWIW, the performance of that would be pretty bad in most MVCC databases, because you can't do an update 'in place' (Ok, Oracle can, but they still have to write both undo and redo log info, so it's effectively the same as not bein

Re: [sqlite] Trigger and Tree Problem

2006-02-23 Thread Jim C. Nasby
rt of the same path. > In this way i get an endless recursion (1). > > GROUP-->SUB-->SUB-->SUB-->PRODUCT > | | | > +-<-1-+ +--->SUB-->PRODUCT > > Is there a way to check all parent (sub)groubs inside a trigger? > > HTH >

Re: [sqlite] Managing trees in the database

2006-02-18 Thread Jim C. Nasby
; is a valid date, maybe that's OK... Their information about using a nested set model seems accurate, though. Another option is to use 'ltree'. There used to be an implimentation for PostgreSQL, but it looks like it's been removed. http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/ltree/REA

Re: [sqlite] SQLite to MySQL

2006-02-10 Thread Jim C. Nasby
On Fri, Feb 10, 2006 at 04:44:30PM +0100, Fanda Vacek wrote: > You can choose what to use. An Elephant or a Dolphin :)) Or you could use both! :P http://commandprompt.com/images/mammoth_versus_dolphin_500.jpg

Re: [sqlite] Creating a (really) big table

2006-02-10 Thread Jim C. Nasby
re > trying to put information that should be in a joined table into columns in > the main table. Agreed. What is it you're trying to do? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] print for debugging from triggers

2006-02-09 Thread Jim C. Nasby
when you need the info most you can't get it. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] testing Avg() function in other database engines

2006-02-08 Thread Jim C. Nasby
sys.com> Voice: 503-667-4517 Fax: > 503-667-8863 > -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] SQLite to MySQL

2006-02-08 Thread Jim C. Nasby
t; > >On Tue, 07 Feb 2006 22:35:09 +0100, John Stanton <[EMAIL PROTECTED]> > >wrote: > > > >>Jim C. Nasby wrote: > >> > >>>On Mon, Feb 06, 2006 at 05:30:39PM +0100, Laurent Goussard wrote: > >>> > >>>>Hi there, &g

Re: [sqlite] Versioning in SQL database?

2006-02-08 Thread Jim C. Nasby
ea of application. Sounds pretty different. Flightaware tracks all flights currently in the air that are under the control of the air traffic system (basically, commercial flights and anyone who's filed an IFR flight plan). I actually know the folks behind the site. -- Jim C. Nasby, Sr. Engineering C

Re: [sqlite] Versioning in SQL database?

2006-02-07 Thread Jim C. Nasby
. An added benefit of a version field is it's a trivial way to detect potential conflicts; if you have the edit code pass back the version it was editing, you can verify that that version is what's still in the database. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Sof

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
to test both sync and async options you can turn fsync off in PostgreSQL by setting fsync to false. If you do that I'd also turn full_page_writes off as well, since there's no point in writing the extra info. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://perv

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 08:07:03PM +0100, Nemanja Corlija wrote: > On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > AFAIK MySQL ships with a few different config files, so presumably > > choosing the appropriate one would be equivalent to what I provided for > &g

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 11:51:22AM -0500, [EMAIL PROTECTED] wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > On Tue, Feb 07, 2006 at 09:54:22AM -0600, Jim C. Nasby wrote: > > > Hrm, that's rather odd. What does top show when it's running through > >

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 08:11:02PM +0100, Nemanja Corlija wrote: > On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > I see theh tcl now... is TCL piping into psql, or are there a set of raw > > files you could post or send me? > TCL generates files and then I'm p

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 10:04:43AM -0500, Clay Dowling wrote: > > Jim C. Nasby said: > > > Well, that certainly won't help things... at a minimum, on your machine, > > you should change the following: > > shared_buffers=1 > > effective_cache_size=10 >

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 09:54:22AM -0600, Jim C. Nasby wrote: > Hrm, that's rather odd. What does top show when it's running through > psql? Are the test scripts available for download? I'll try this on my > machine as well... I see theh tcl now... is TCL piping into psql, or are th

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
quivalent to what I provided for PostgreSQL. BTW, has anyone looked at adding SQLite support to any of the DBT benchmarks? http://sourceforge.net/projects/osdldbt -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-611

Re: [sqlite] More benchmarks

2006-02-07 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 10:08:23AM +0100, Nemanja Corlija wrote: > On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > On Tue, Feb 07, 2006 at 07:31:50AM +0100, Nemanja Corlija wrote: > > > > Well, that certainly won't help things... at a minimum, on your machine

Re: [sqlite] More benchmarks

2006-02-06 Thread Jim C. Nasby
n a machine with very minimal hardware. It's the equivalent to using MySQL's minimum configuration file. It certainly doesn't seem unreasonable to tweak a handful of parameters for each database. I wouldn't even consider this to be tuning; everything I recommended is a fairly standar

Re: [sqlite] More benchmarks

2006-02-06 Thread Jim C. Nasby
On Tue, Feb 07, 2006 at 07:06:26AM +0100, Nemanja Corlija wrote: > On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > For test 8 on PostgreSQL, what's EXPLAIN ANALYZE for one of those show? > test=# EXPLAIN ANALYZE SELECT count(*), avg(b) FROM t2 WH

Re: [sqlite] More benchmarks

2006-02-06 Thread Jim C. Nasby
how? What changes have you made to the default postgresql.conf? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] SQLite to MySQL

2006-02-06 Thread Jim C. Nasby
FWIW, I believe SQLite's syntax is closer to PostgreSQL's than it is to MySQL, so it might me easier to migrate that direction... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] Auto Increment?

2006-01-31 Thread Jim C. Nasby
On Tue, Jan 31, 2006 at 10:05:47AM -0700, Dennis Cote wrote: > [EMAIL PROTECTED] wrote: > CREATE TABLE x(i INTEGER PRIMARY KEY AUTOINCREMENT CHECK(i < (1<<32))); I suspect you'll see better performance if you hard-code the value instead of doing a bit-shift every time you insert. -

Re: [sqlite] Database design and SQLite

2006-01-16 Thread Jim C. Nasby
>is going to be slow. > > Heh, that should obviously read '6 million rows' . Sorry, its early. Unless your rows were exceptionally wide, that shouldn't be difficult to handle at all. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://perva

Re: [sqlite] proposal for improving concurrency in SQLite

2006-01-10 Thread Jim C. Nasby
ing up with missing log files, I would certainly hope it would just stop dead in it's tracks rather than corrupt anything. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

Re: [sqlite] proposal for improving concurrency in SQLite

2006-01-10 Thread Jim C. Nasby
On Mon, Jan 09, 2006 at 09:08:10PM -0800, Dan Kennedy wrote: > > > --- "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > > On Mon, Jan 09, 2006 at 06:47:04PM +0100, Eduardo wrote: > > > of transactions per second. But because each transaction requires

Re: [sqlite] proposal for improving concurrency in SQLite

2006-01-09 Thread Jim C. Nasby
On Mon, Jan 09, 2006 at 06:47:04PM +0100, Eduardo wrote: > of transactions per second. But because each transaction requires at > least two revolutions of the disk platter, SQLite is limited to about Why does a transaction commit require two seperate writes? -- Jim C. Nasby, Sr. Engin

Re: [sqlite] ring buffer table

2006-01-09 Thread Jim C. Nasby
entries in order? You can either just use a simple sequence and then delete where sequence mod = 0 (hrm... does sqlite support functional indexes?), or just add a timestamp to the table. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://perva

Re: [sqlite] INERT OR REPLACE behavior

2006-01-08 Thread Jim C. Nasby
constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://ji

Re: [sqlite] enum in SQLite

2006-01-05 Thread Jim C. Nasby
d; Wouldn't that be a lot more efficient with some kind of EXISTS test rather than a count(*)? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [sqlite] specifying field type, any benefit?

2006-01-04 Thread Jim C. Nasby
hould work. Of course, you're ultimately just making the database do more work; you should really just insert the int as an int and be done with it... INSERT INTO students(age) VALUES(18); -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pe

Re: [sqlite] LIMIT keyword does work in an UPDATE statement

2006-01-03 Thread Jim C. Nasby
(SELECT id FROM tbl1 WHERE ...