logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Dorrat <simon.dor...@gsjbw.com>
Subject RE: logging_event_property column sizes
Date Mon, 21 Jun 2004 00:45:38 GMT
Just came across this email, hope its not too late.  I would definitely
recommend using Varchars.  The space saving gained multiplies as it affects
indexes too, and that then translates into much better performance.
Especially when you have potentially very long keys (like the 254 chars you
mentioned).

Most sophisticated dbs should cope with variable length records fine,
optimising storage when it has to.   Generally any performance improvement
from fixed length records here would be less than the overall space and
performance penalty.

Something to consider too: better to use the VARCHAR2 column type with
Oracle.  VARCHAR is currently synonymous with VARCHAR2, but is reserved for
future use, so could change in the future.  (The history of the
VARCHAR/VARCHAR2 columns is a bit of a laughable debacle).

Simon

> -----Original Message-----
> From:	Paul Smith [SMTP:Paul.Smith@lawlex.com.au]
> Sent:	Saturday, 15 May 2004 10:38 AM
> To:	'James Stauffer '; ''log4j-dev@logging.apache.org' '
> Subject:	RE: logging_event_property column sizes
> 
> Actually, if the coumn is a varchar one, then no space is wasted from what
> I
> remember. Only the exact # chars for the row is allocated.
> 
> Having said that, I can speak from my own personal experience with some
> DB's
> when I recommend an actual fixed size column (char).  If you can get a
> table's row size to be exactly the same for each row, then most db's can
> optimize retrievals, particularly with table scans.  YMMV of course.
> 
> I agree that 254 for values seems a bit small, but I would'nt recommend
> making it smaller for the key size either, you'd be surprised how quickly
> someone would run in to that limit.
> 
> 
> cheers,
> 
> Paul Smith
> 
> -----Original Message-----
> From: James Stauffer
> To: 'log4j-dev@logging.apache.org'
> Sent: 5/14/04 11:31 PM
> Subject: logging_event_property column sizes
> 
> In logging_event_property both mapped_key and mapped_value are 254
> characters. 
> I don't think I have any keys longer than about 10 characters but I do
> have values more than 254 characters. 
> What would you think of decreasing mapped_key to something like 32 (this
> isn't important to me but 254 seems like a waste of space) and
> increasing mapped_value to 510 or 1022 (assuming that 254 was chosen as
> 2 less than a power of 2)?
> 
> James Stauffer 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org


Goldman Sachs JBWere
Disclosure of Interest
ORG:  Goldman Sachs JBWere and/or its affiliates expect to receive or intend to seek compensation
for financial and advisory services in the next 3 months from the company, its parent, or
its wholly owned or majority owned subsidiary.



GOLDMAN SACHS JBWERE PTY LTD DISCLAIMER

Goldman Sachs JBWere Pty Ltd and its related entities distributing this document and each
of their respective directors, officers and agents ("the Goldman Sachs JBWere Group") believe
that the information contained in this document is correct and that any estimates, opinions,
conclusions or recommendations contained in this document are reasonably held or made as at
the time of compilation.  However, no warranty is made as to the accuracy or reliability of
any estimates, opinions, conclusions, recommendations (which may change without notice) or
other information contained in this document and, to the maximum extent permitted by law,
the Goldman Sachs JBWere Group disclaims all liability and responsibility for any direct or
indirect loss or damage which may be suffered by any recipient through relying on anything
contained or omitted from this document.

Goldman Sachs JBWere does not represent or warrant the attached files are free from computer
viruses or other defects.  The attached files are provided, and may only be used, on the basis
that the user assumes all responsibility for any loss, damage or consequence resulting directly
or indirectly from use.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message