473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

performance issues related to timestamps

Hi,

Is there any performance issues related to having default timestamps in
tables?

I have a Data Model in which all the tables have created_tms and
last_updated_tms which I have set default value as Current timestamp.

During insert, these values are not given and only during updates the
last_updated_tms is updated to current timestamp.

Does having these affect the performance of the queries or the database
?

regards,
rAinDeEr

May 23 '06 #1
3 1463
rAinDeEr wrote:
Hi,

Is there any performance issues related to having default timestamps
in tables?

I have a Data Model in which all the tables have created_tms and
last_updated_tms which I have set default value as Current timestamp.

During insert, these values are not given and only during updates the
last_updated_tms is updated to current timestamp.

Does having these affect the performance of the queries or the
database ?


I suppose they take up some space and therefore cause more I/O when the
table is queried (or written to for that matter). But, assuming the
fields aren't a significantly large portion of the row-size I'd guess
that the performance impact would be negligable?

Still, timestamp is quite a "large" datatype in the scheme of things
(10 bytes storage if I recall correctly?)

There's also the issue of whether you're using triggers to maintain the
timestamps on update, which I guess would add a bit to the processing
overhead of updates.

I guess it boils down to: if you don't actually *need* them on every
table, why have them? If you actually have a requirement to track the
created and modification dates (auditing and what-not), then you don't
have much of a choice, but if there's no such requirement I'd opt for
simplicity over complexity :-)
Dave.

--

May 23 '06 #2
"rAinDeEr" <ta**********@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Hi,

Is there any performance issues related to having default timestamps in
tables?

I have a Data Model in which all the tables have created_tms and
last_updated_tms which I have set default value as Current timestamp.

During insert, these values are not given and only during updates the
last_updated_tms is updated to current timestamp.

Does having these affect the performance of the queries or the database
?

regards,
rAinDeEr


Unless you have an extremely high insert rate, I would not worry about it.
May 23 '06 #3
Hi Dave, Mark...

I am not using triggers to update the last updated user and timestamp.
I just need to track who is updating the table and at what time..So I
guess having them wouldnt matter much..
I dont have a high insert rate either....

thanks a lot..
rAinDeEr

May 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
16
by: David W. Fenton | last post by:
http://www.granite.ab.ca/access/performancefaq.htm I hope Tony doesn't mind my opening a discussion of some issues on his performance FAQ page here in the newsgroup. This is not meant as...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
3
by: thomson | last post by:
Hi All, We all know the flexibility given by the datagrid, in asp.net. But i want to know one thing Is there any performance issues using the datagrid, In Asp. we used tables to manipulate a...
6
by: Pascal Polleunus | last post by:
Hi, I'm wondering if there could be problems related to inheritance in the following scenario (with PostgreSQL 7.4.1)... 1 A-table, abstract. Max 10 B-tables that inherit from A, with...
3
by: KWilliams | last post by:
I'd like to get some good advice about our old ASP site. You can see our home page at: http://www.douglas-county.com/ ....and an example application page at:...
2
by: Brian Tabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
2
by: BTabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.