473,385 Members | 1,396 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,385 software developers and data experts.

Sleep Question

On our production server, we have a great deal of data. To improve
performance, we give the user a "page" of data at a time and then spawn count
of the total number of products based on the query parameters on a separate
thread. The user can change their mind, of course, and change their query
before the count has returned for the previous query. We are trying to
simulate a lot of data on our developement server by putting a sleep command
(dbms_lock.sleep) in the stored procedure. I'm having problems terminating
the thread. I've used the bool variable as even abort, but it still takes the
full sleep time. Is the Oracle sleep command simular to the .Net command and
is not interruptable? It would be much easier to just load more data into teh
tables or at least do add some monster query into it for testing, but the DBA
says this should be just as good.

Thanks,
Susan
Aug 16 '06 #1
4 2149
Your abort is killing the thread in your application but it sounds like your
command is still running on the database (is this how you are measuring that
it is still "alive"?)

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Susan" <Su***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
On our production server, we have a great deal of data. To improve
performance, we give the user a "page" of data at a time and then spawn
count
of the total number of products based on the query parameters on a
separate
thread. The user can change their mind, of course, and change their query
before the count has returned for the previous query. We are trying to
simulate a lot of data on our developement server by putting a sleep
command
(dbms_lock.sleep) in the stored procedure. I'm having problems terminating
the thread. I've used the bool variable as even abort, but it still takes
the
full sleep time. Is the Oracle sleep command simular to the .Net command
and
is not interruptable? It would be much easier to just load more data into
teh
tables or at least do add some monster query into it for testing, but the
DBA
says this should be just as good.

Thanks,
Susan

Aug 16 '06 #2
your DBA is wrong. Use a good stress testing tool to generate the actual
volume rather than trying to simulate it with a hack.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Susan" <Su***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
On our production server, we have a great deal of data. To improve
performance, we give the user a "page" of data at a time and then spawn
count
of the total number of products based on the query parameters on a
separate
thread. The user can change their mind, of course, and change their query
before the count has returned for the previous query. We are trying to
simulate a lot of data on our developement server by putting a sleep
command
(dbms_lock.sleep) in the stored procedure. I'm having problems terminating
the thread. I've used the bool variable as even abort, but it still takes
the
full sleep time. Is the Oracle sleep command simular to the .Net command
and
is not interruptable? It would be much easier to just load more data into
teh
tables or at least do add some monster query into it for testing, but the
DBA
says this should be just as good.

Thanks,
Susan

Aug 16 '06 #3
I can see what your DBA is trying to do, but its not a real measure of
stress testing as all your testing is the stored proc holding up the
conclusion of a request. In theory, all requests would take the duration of
the sleep timeout and thats not how systems work.

Get a proper stress testing tool and let your procedures work as they should
be in a live environment.

Regards

John Timney (MVP)
"Susan" <Su***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
On our production server, we have a great deal of data. To improve
performance, we give the user a "page" of data at a time and then spawn
count
of the total number of products based on the query parameters on a
separate
thread. The user can change their mind, of course, and change their query
before the count has returned for the previous query. We are trying to
simulate a lot of data on our developement server by putting a sleep
command
(dbms_lock.sleep) in the stored procedure. I'm having problems terminating
the thread. I've used the bool variable as even abort, but it still takes
the
full sleep time. Is the Oracle sleep command simular to the .Net command
and
is not interruptable? It would be much easier to just load more data into
teh
tables or at least do add some monster query into it for testing, but the
DBA
says this should be just as good.

Thanks,
Susan

Aug 16 '06 #4
Actually, the thread running the process doesn't die till the stored
procedure comes back for some reason. I had tried the OracleCommand.Cancel
on the stored procedure and then ending the thread, but that seems to hang as
well. It also seems to prevent additional stored procs from running till it
is done.

"Greg Young" wrote:
Your abort is killing the thread in your application but it sounds like your
command is still running on the database (is this how you are measuring that
it is still "alive"?)

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Susan" <Su***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
On our production server, we have a great deal of data. To improve
performance, we give the user a "page" of data at a time and then spawn
count
of the total number of products based on the query parameters on a
separate
thread. The user can change their mind, of course, and change their query
before the count has returned for the previous query. We are trying to
simulate a lot of data on our developement server by putting a sleep
command
(dbms_lock.sleep) in the stored procedure. I'm having problems terminating
the thread. I've used the bool variable as even abort, but it still takes
the
full sleep time. Is the Oracle sleep command simular to the .Net command
and
is not interruptable? It would be much easier to just load more data into
teh
tables or at least do add some monster query into it for testing, but the
DBA
says this should be just as good.

Thanks,
Susan


Aug 16 '06 #5

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

Similar topics

11
by: ritterhaus | last post by:
Just a simple bit of code to toggle between two state at intervals... import time for i in range(4): print 'On' time.sleep(1) print 'Off' time.sleep(1) .... SHOULD toggle On and Off four...
29
by: Jeffrey Maitland | last post by:
Hello all, I am in the process of writing a multithreading program and what I was wondering is a sleep command in an executing function will affect the threads below it? Here is a basic example...
7
by: John | last post by:
Thanks. I am writing a C++ code on Linux and Sun OS platform. How to make a procedure sleep or delay? Thanks again. "John Carson" <donaldquixote@datafast.net.au> wrote in message...
21
by: Alo Sarv | last post by:
Hi From what I have understood from various posts in this newsgroup, writing event loops pretty much comes down to this: while (true) { handleEvents(); sleep(1); // or _sleep() or...
7
by: lokb | last post by:
Hi, I am creating a detach thread as shown below and caling pthread_create in a while loop where the file names in the directory are fetched and is passed as a parmater to pthread create. The...
3
by: Stephen Miller | last post by:
I have an ASP.Net application that sends a NetworkStream to a .Net Service, which has a TcpListener listening on a port for the ASP.Net client. When it receives a request it creates a new thread...
14
by: Joe | last post by:
Does anyone know the difference, in practical terms, between Thread.Sleep (10000) and Thread.CurrentThread.Join (10000)?? The MSDN says that with Join, standard COM and SendMessage pumping...
21
by: JackCoke | last post by:
Hello. I am new at this so forgive me if there is a simple answer, although it is one I could not find. My VB 2003 program can scan a folder, determine the size of the file it finds, wait 30...
1
by: fniles | last post by:
I am using VB.NET 2003 and a socket control. As I get quotes, I add the quote to the arraylist, and I send the quotes to my clients by removing the message from the arraylist and send it to the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.