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 ? 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);
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);
"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;
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);
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);
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/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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
|
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...
|
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
|
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
| |
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...
|
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...
|
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
|
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
|
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...
|
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...
| |
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |