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

Monitoring progress on a join

I'm doing a big old join on one table with 10,000,000 rows, and
another with
400,000 rows. As you can imagine, this is taking a long time.

Is there any way to monitor the progress of the join after executing
the sql statement (more specifically, from code)?

(Oh, and any good practices for speeding up this join would be
appreciated, too).

Thanks,

Andrew
Jul 20 '05 #1
3 2117
Andrew (aj*******@hotmail.com) writes:
I'm doing a big old join on one table with 10,000,000 rows, and
another with
400,000 rows. As you can imagine, this is taking a long time.

Is there any way to monitor the progress of the join after executing
the sql statement (more specifically, from code)?
If it's a SELECT statement that produces a result set, I don't think
there is much you can monitor. You can keep an on the cpu, physical_io
and memusage columns in sysprocesses, but since you don't know what
the target values, you can only see that the process is working, but
not how much work that is left.

If you are also inserting the data into a table, a SELECT with NOLOCK
on the table can give some progress indication. On the INSERT that
is, so if finding the qualifying rows is what takes time, you will
still not see much.
(Oh, and any good practices for speeding up this join would be
appreciated, too).


Without any knowledge about the query and the tables, it is difficult
to give precise advice. But selective indexes for the WHERE condition.
If you are not including too many columns, a covering index or two may
be worth investigating.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
In addition to Erland's notes: if your query is about the only thing
running on the machine, and you have collected information from previous
runs, then you can use

select @@cpu_busy, @@io_busy

to monitor the cpu and i/o usage before and during your execution, and
deduct the progress.

Hope this helps,
Gert-Jan
Andrew wrote:

I'm doing a big old join on one table with 10,000,000 rows, and
another with
400,000 rows. As you can imagine, this is taking a long time.

Is there any way to monitor the progress of the join after executing
the sql statement (more specifically, from code)?

(Oh, and any good practices for speeding up this join would be
appreciated, too).

Thanks,

Andrew

Jul 20 '05 #3
On 15 Sep 2003 12:01:53 -0700 in comp.databases.ms-sqlserver,
aj*******@hotmail.com (Andrew) wrote:
I'm doing a big old join on one table with 10,000,000 rows, and
another with
400,000 rows. As you can imagine, this is taking a long time.

Is there any way to monitor the progress of the join after executing
the sql statement (more specifically, from code)?

(Oh, and any good practices for speeding up this join would be
appreciated, too).


The tools you want are in Query Analyser: Show Execution Plan, also
Index analysis (on that data you might want to leave that running
overnight <g>). Don't know about "from code" :-\

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)
Jul 20 '05 #4

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

Similar topics

0
by: Sven Dzepina | last post by:
Hi All, how I can make a simply HostWatch - system which use a mysql DB and send me an e-Mail if the Server goes off and again on? I began to programm this last night, but the MySQL inquiry is...
2
by: flamesrock | last post by:
Certain web applications, everything from wget to downloader for X has this nifty feature I'd like to accomplish in python. Its the progress bar/time elapsed/time remaining scheme Filename |...
1
by: Ron | last post by:
I am trying to run asp.net pages. The server is accessed via http://sitename/username I have verified it is using port 80 and aspx extensions are configured. But when I run and asp.net page I...
4
by: johnm | last post by:
Hello, We currently are running a CRM application that uses DB/2 7.2 for the data repository. We will be upgrading to 8.2 later this year....maybe....time and resources permitting. The...
3
by: Curtis Kam | last post by:
Hi, How can I monitor the file size of a file which is still copying? If I've used FileInfo.Length, it'll return the final file size, not the intermediate one. Thanks. Regards, Curtis Kam
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
by: Michel Esber | last post by:
Hello, DB2 LUW V8 FP 11. How do I monitor the progress of a "reorg indexes all" command ? I can use SNAPSHOT_TBREORG when I reorg the table, but not the indexes. According to...
5
by: Ben | last post by:
I am building a web app using ASP.NET 2.0. One of the requirements is that we link to a third party vendor's site, display their content. let the user make choices on the vendors site and then...
3
by: Ritesh Raj Sarraf | last post by:
Hi, I have a small application, written in Python, that uses threads. The application uses function foo() to download files from the web. As it reads data from the web server, it runs a progress...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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...

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.