InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InstantDB: Tremendously long time for an update


Hello, all --

First off, I have fastUpdate set to 1, searchDeletes set to 0, and even turned 
journaling off with transLevel set to 0, just in case.

I need to do an update setting the value of a tinyint column for every row in a 
92,000 row table.  When I try this, InstantDB churns along for an hour or more 
working on the update, which is *way* too long to be useful.  I've actually 
never let it finish, since an hour is far beyond acceptable for this 
application.  

For example, if I have a table like the following:

CREATE TABLE test(prod_id varchar(16) PRIMARY KEY, status tinyint)

I want to set status to 0.  The natural thing is to do

UPDATE test SET status = 0

However, it's actually much quicker, believe it or not, to do this:

1) SELECT prod_id INTO tmp FROM test
2) DROP TABLE test
3) SELECT prod_id, 0 INTO test FROM tmp
4) DROP TABLE tmp

The above workaround takes about 15 minutes to complete for around 92000 rows, 
which is barely acceptable for the application: but much faster than simply 
updating the original table!  My question is, does anyone have any more tips on 
speeding up updates?  All I can find in the docs and mailing list archives is 
mention of the fastUpdate and searchDeletes parameters.

btw, The only index on the table is the primary key.

Regards, and thanks for any help!
Liam
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.