473,657 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timestamp issue under heavy load

We're seeing very strange behaviour with db2 under heavy load.

We're running our system in GMT and the timezone never changes for
British Summer Time.

Basically the thing we're doing is (using the udb jdbc driver):

"values current timestamp"

get that value and supply it "?" in the next insert statement :

insert into x,y,ts values (x,y,?);

Most of the time ( 99.999...%) this works fine, but what we have found
(due to debug statements etc.) that under heavy system load, the
timestamp inserted via the second statement, is actually 1 hour behind
what it should be.

Any thoughts ?

Jun 23 '06 #1
6 1835
"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@y 41g2000cwy.goog legroups.com...
We're seeing very strange behaviour with db2 under heavy load.

We're running our system in GMT and the timezone never changes for
British Summer Time.

Basically the thing we're doing is (using the udb jdbc driver):

"values current timestamp"

get that value and supply it "?" in the next insert statement :

insert into x,y,ts values (x,y,?);

Most of the time ( 99.999...%) this works fine, but what we have found
(due to debug statements etc.) that under heavy system load, the
timestamp inserted via the second statement, is actually 1 hour behind
what it should be.

Any thoughts ?


Is there some reason why you don't use this:

insert into x,y,ts values (x, y, current_timesta mp);
Jun 23 '06 #2
Yes there is. Basically we need to use the timestamp in another
statement later on. It is part of a key to the table we are insert into
to.
Mark A wrote:
"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@y 41g2000cwy.goog legroups.com...
We're seeing very strange behaviour with db2 under heavy load.

We're running our system in GMT and the timezone never changes for
British Summer Time.

Basically the thing we're doing is (using the udb jdbc driver):

"values current timestamp"

get that value and supply it "?" in the next insert statement :

insert into x,y,ts values (x,y,?);

Most of the time ( 99.999...%) this works fine, but what we have found
(due to debug statements etc.) that under heavy system load, the
timestamp inserted via the second statement, is actually 1 hour behind
what it should be.

Any thoughts ?


Is there some reason why you don't use this:

insert into x,y,ts values (x, y, current_timesta mp);


Jun 23 '06 #3
"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...
Yes there is. Basically we need to use the timestamp in another
statement later on. It is part of a key to the table we are insert into
to.


I would try this to see if it helps:

select current_timesta mp from sysibm.sysdummy 1;
Jun 23 '06 #4
what is the problem with :

select ts from new table (insert into table (x,y,ts) values (x,y,current
timestamp) ?

"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...
Yes there is. Basically we need to use the timestamp in another
statement later on. It is part of a key to the table we are insert into
to.
Mark A wrote:
"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@y 41g2000cwy.goog legroups.com...
> We're seeing very strange behaviour with db2 under heavy load.
>
> We're running our system in GMT and the timezone never changes for
> British Summer Time.
>
> Basically the thing we're doing is (using the udb jdbc driver):
>
> "values current timestamp"
>
> get that value and supply it "?" in the next insert statement :
>
> insert into x,y,ts values (x,y,?);
>
> Most of the time ( 99.999...%) this works fine, but what we have found
> (due to debug statements etc.) that under heavy system load, the
> timestamp inserted via the second statement, is actually 1 hour behind
> what it should be.
>
> Any thoughts ?
>


Is there some reason why you don't use this:

insert into x,y,ts values (x, y, current_timesta mp);

Jun 23 '06 #5
You're both missing the point. It works 99.99999% of the time,
occasionaly it doesn't work. Usually under heavy load. This to me,
smells like a race condition of some sort in the db2 driver.
Paul Peters wrote:
what is the problem with :

select ts from new table (insert into table (x,y,ts) values (x,y,current
timestamp) ?

"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...
Yes there is. Basically we need to use the timestamp in another
statement later on. It is part of a key to the table we are insert into
to.
Mark A wrote:
"Chris Burnley" <ch***********@ gmail.com> wrote in message
news:11******** *************@y 41g2000cwy.goog legroups.com...
> We're seeing very strange behaviour with db2 under heavy load.
>
> We're running our system in GMT and the timezone never changes for
> British Summer Time.
>
> Basically the thing we're doing is (using the udb jdbc driver):
>
> "values current timestamp"
>
> get that value and supply it "?" in the next insert statement :
>
> insert into x,y,ts values (x,y,?);
>
> Most of the time ( 99.999...%) this works fine, but what we have found
> (due to debug statements etc.) that under heavy system load, the
> timestamp inserted via the second statement, is actually 1 hour behind
> what it should be.
>
> Any thoughts ?
>

Is there some reason why you don't use this:

insert into x,y,ts values (x, y, current_timesta mp);


Jun 23 '06 #6
Chris Burnley wrote:
You're both missing the point. It works 99.99999% of the time,
occasionaly it doesn't work. Usually under heavy load. This to me,
smells like a race condition of some sort in the db2 driver.

If you think it's a DB2 bug please open a PMR.
Try this alternative:
TIMESTAMP(GENER ATE_UNIQUE())

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jun 23 '06 #7

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

Similar topics

13
9286
by: perplexed | last post by:
How do you convert a user inputted date to a unix timestamp before insterting it into your database? I have a form, with a textfield for a date that the user inputs in the format mm-dd-yyyy and three dropdow boxes for hours, minutes, and AM/PM. All of these need to be considered together and converted to one Unix Timestamp and then inserted to the MYSQL date field. The type of field is INT (11) so that I can instead of the standard...
0
1516
by: Kayra Otaner | last post by:
Hi all, I want to get your opinions on how to increase available/free memory and performance on a heavy volume database server. I have MySQL 4.0.13 running on RH 7.2 replicated to another RH 7.2 using same MySQL version. Recently our master database server (2 AMD Cpu + 2Gb memory + 2Gb swap space) started to suffer from memory outages because of heavy load. During day available free memory is changing from 200Mb to 5Mb and when
0
1671
by: kayra | last post by:
Hi all, I want to get your opinions on how to increase available/free memory and performance on a heavy volume database server. I have MySQL 4.0.13 running on RH 7.2 replicated to another RH 7.2 using same MySQL version. Recently our master database server (2 AMD Cpu + 2Gb memory + 2Gb swap space) started to suffer from memory outages because of heavy load. During day available free memory is changing from 200Mb to 5Mb and when...
2
5806
by: jay | last post by:
hi, Question on Load/import command. consider a sample table create table table_name ( col1 timestamp not null default current timestamp, col2 int, col3 int, col4 int, primary key(col1) ); There is a file file.del containing data for col2,col3,col4. Data for
6
2514
by: Robert Schuldenfrei | last post by:
Dear NG, As expected, when I went to implement TIMESTAMP, I failed. With the help of Kevin Yu, I got the 2 code segments at the bottom working using a WHERE clause that checks all columns. SQL does not like my use of TIMESTAMP. First, notice that I have used "string" type data to hold the TIMESTAMP column in C#. Second, the Primary Key is
1
7986
by: Roger Twomey | last post by:
I have a database that I don't want to lock. I decided that before any updates can occur I would check a timestamp value and ensure that nobody else updated before I did (avoiding the 'last update wins' scenario). I have a problem, I can read the Timestamp from the db when I read the record. I currently use the data to pre-fill a form (gee go figure ;) ) and the user changes some values and updates. I don't know what to DO with the...
6
3424
by: Jim C. Nasby | last post by:
Is there any reason why there isn't a predefined cast to go from a timestamp to a varchar? Is there a reason not to add one? -- Jim C. Nasby, Database Consultant jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or...
5
5365
by: pankaj_wolfhunter | last post by:
Greetings, In Sybase, a timestamp column is automatically loaded by the DB engine and its in some hex format. This is shown below id timestamp_value ----------- ------------------ 1 0x0000000000001031 1 0x0000000000001046 when i try to load this timestamp data into DB2 timestamp column, it
1
11888
by: Frank Swarbrick | last post by:
We're trying to take advantage of the new ROW CHANGE TIMESTAMP option. Here is a simple table: CREATE TABLE "ACCTASGN"."NUMBER_STATUS" ( "STATUS_CODE" CHAR(1) NOT NULL , "STATUS_DESCRIPTION" VARCHAR(40) NOT NULL , "LAST_UPDATE" TIMESTAMP NOT NULL GENERATED ALWAYS FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.