I assume you mean a "read-only" table?
  I use a separate database with the same table structure as the live data, 
in sql server, where I upload the data over the internet. The information 
is stored in my local computer, but has to be "massaged" into a format to 
make it faster to display on the server.. so I use cold fusion on my local 
machine to run a template that selects the data from the local database, 
reformats it and then saves it on the server (which is co-located). This 
process takes about 4 minutes for my database..
     Then I run a stored procedure which deletes the data in the live 
database, and then copies the data from the copy database to the live 
database.  This takes about 3 seconds!  While it is being copied - it has 
an exclusive lock, and anyone trying to access it just has to wait for it - 
it goes so fast that nobody would really notice, and nothing times out.
   When I first tried it - I didn't use the temporary tables.. and had that 
4 minutes of downtime which caused a lot of problems. The trick is to 
minimzie the downtime by having the database do all of the work within a 
stored procedure from a copy of the data in the corect format - so no 
manipulation other than just a quick copy!  Cold fusion queries (without a 
stored procedure) is too slow for the copy part, because data has to be 
transferred from the database server to the webserver and back again.. 
which takes a lot of time!

Al Musella
a1webs.com



> > How do most people on here handle updating a database on a high traffic
> > site?  How do you handle replication of data between old and new versions
>of
> > the database?  How do you handle uploading the new database?  Do you shut
> > down the old one for a few minutes, thereby shutting the whole site down?
> > Or, if it would be easier, does anyone know of any good 'tutorials',
> > examples, or documentation dealing with this subject?  I would prefer info
> > speciffic to Sybase databases, but will take anything since I'm sure most
> > solutions apply in all cases.
> >
> > Todd

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to