Performance improvement for xml loads (+comments)

Patrick Spinler spinler.patrick@mayo.edu
Thu, 07 Dec 2000 17:28:39 -0600


Derek Atkins wrote:
> 
> I admit that I don't know very much about DBMS systems.  Are columns
> in a table labeled?  And can you arbitrarily add a new column to an
> existing table 

Yes, and yes.  

While it is possible to access SQL data in a position dependant manner,
it is considered bad practice and heavily frowned upon.  At least, I've
never approved code that does that in any of my code reviews.

More typical is to say something like this (making up a gnucashish
example):

select transaction_date, transaction_id, reconciled_flag, 
       amount, description
into :trans_date, :trans_id, :rec_flag, :trans_amount, :desc
from splits
where from_account = :account_code

<snip>

> 
> But if this _IS_ how you do it, I still claim that it is equivalent to
> reading in all your data and then writing it out in the "new" format
> (or, in this case, a new table with an additional column).  I suppose
> the only benefit here is that if you run an older application that
> doesn't understand the new data against the newer database table with
> the newer data, then it could still theoretically understand the rest
> of the data.  

Not the only benefit, by any means.  To my mind, the _real_ benefit is
that I, or Jane Schmo, or programmer from the street, can start poking
around in this SQL database _with_no_other_information_or_tools_, and
gather a lot of useful data therefrom.

This is also the true strength of an ASCII data format.  Even the
example you gave in the snipped portions of your original post contains
a lot of information I can look at and start to see how things work and
what they mean, claims to the contrary aside.

This is the true reason why all the major unix subsystems do their
configurations in ASCII flat files.  Think about apache, for instance,
or even worse, sendmail.  That's one hellish config file, especially
since it has to be parsed on startup _every_single_time_, which happens
frequently on e.g. a busy mail system.  Yet, neither of these monsters
have gone to a binary config file format (although I will grant you that
sendmail's is pretty, um, obfuscated :-).  Go hunt around on the
sendmail or apache mailing list archives, or the linux kernel archives,
etc.  In all of these cases, you can find discussions about binary vrs
text config file formats.  The discussions are illuminating.

-- Pat

-- 
      This message does not represent the policies or positions
	     of the Mayo Foundation or its subsidiaries.
  Patrick Spinler			email:	Spinler.Patrick@Mayo.EDU
  Mayo Foundation			phone:	507/284-9485