Showing posts with label job. Show all posts
Showing posts with label job. Show all posts

Monday, March 26, 2012

Parameter Either Or

Hi

Background

I have a report that can be either date based (start and end dates, shows multiple jobs) or job number based (shows one job). Parameters all setup and it's working, it uses one SP. I have Allow Null selected for each of the three possible entry boxes. SP says IF JobNumber IS NULL Then Do this ELSE Do that

Problem

It looks messy. I have a label on the start date parameter "EITHER Please select a start date:" And a label on the job number parameter "OR Please select a job number:"


The user can then tick/untick NULL and enter either a date or a job number. Any way of making this work a little better? An initial parameter of report type > Job Number Or Date. Then just show the appropriate parameter for example. To do this I'd need to (I think) dynamically hide a parameter, can this be done? Any other ideas?

Cheers

Just have one parameter (string)

You can always use a code block to check formatting and provide msgboxs.

Then just convert the string to the required datatype|||

You can have three parameters. Use first one to decide whether you would want to run the report with parameter 1 or Parameter 2.

So, the out of three user will pick 2 parameters. and in the back end you will use the first one to decide which one to use and which one to discard.....

|||

Thanks for the replies. Adolf - I have 3 parameters so 1 free entry text box isn't really going to work for me.

TechQuest - I have no problem making it work in the back end, I want the front end to display either parameters start & end dates or parameter job number. If I have the initial parameter with options of Date Or Job Number. They select Date, how do I make just the Date parameters appear?

I may not understand exactly what you mean but you say the user will pick 2 out of the 3 parameters and the back end will sort it, but that's what I have now

|||

Unfortunately there is no way for you to achieve a much better user experience. RS does not allow you to show/hide parameters dynamically at run time.

What I suggest is maybe setting the value of the unused parameter something meaningfull to show that it should not be used. A lot depends on your current setup of the parameters i.e is job id a dropdown or a text box? Is date from and to date picker controls or textboxes?

So, based on the previous suggestions, I would say have the following:

Parameter 1 = Filter Type {Job ID, Date Range}

Parameter 2 = Job ID, I suggest you make this a dropdown of valid job ID's. When parameter 1 = Date Range populate this dropdown with just 1 value that says "N/A - Please select a date range".

Parameters 3 & 4 = You have a couple options here, if you make them date pickers then you can't set their values to to infomative text. You could if you make them text boxes but then you wouldn't get the nice functionality of a date picker.

Either way it's not going to be as nice as coding your own UI.

|||

Thanks for that Adam. At least I can stop searching for an 'nice' answer now as I know it's not possible. I'll go down the route you suggest.

Cheers

sql

Parameter Either Or

Hi

Background

I have a report that can be either date based (start and end dates, shows multiple jobs) or job number based (shows one job). Parameters all setup and it's working, it uses one SP. I have Allow Null selected for each of the three possible entry boxes. SP says IF JobNumber IS NULL Then Do this ELSE Do that

Problem

It looks messy. I have a label on the start date parameter "EITHER Please select a start date:" And a label on the job number parameter "OR Please select a job number:"


The user can then tick/untick NULL and enter either a date or a job number. Any way of making this work a little better? An initial parameter of report type > Job Number Or Date. Then just show the appropriate parameter for example. To do this I'd need to (I think) dynamically hide a parameter, can this be done? Any other ideas?

Cheers

Just have one parameter (string)

You can always use a code block to check formatting and provide msgboxs.

Then just convert the string to the required datatype|||

You can have three parameters. Use first one to decide whether you would want to run the report with parameter 1 or Parameter 2.

So, the out of three user will pick 2 parameters. and in the back end you will use the first one to decide which one to use and which one to discard.....

|||

Thanks for the replies. Adolf - I have 3 parameters so 1 free entry text box isn't really going to work for me.

TechQuest - I have no problem making it work in the back end, I want the front end to display either parameters start & end dates or parameter job number. If I have the initial parameter with options of Date Or Job Number. They select Date, how do I make just the Date parameters appear?

I may not understand exactly what you mean but you say the user will pick 2 out of the 3 parameters and the back end will sort it, but that's what I have now

|||

Unfortunately there is no way for you to achieve a much better user experience. RS does not allow you to show/hide parameters dynamically at run time.

What I suggest is maybe setting the value of the unused parameter something meaningfull to show that it should not be used. A lot depends on your current setup of the parameters i.e is job id a dropdown or a text box? Is date from and to date picker controls or textboxes?

So, based on the previous suggestions, I would say have the following:

Parameter 1 = Filter Type {Job ID, Date Range}

Parameter 2 = Job ID, I suggest you make this a dropdown of valid job ID's. When parameter 1 = Date Range populate this dropdown with just 1 value that says "N/A - Please select a date range".

Parameters 3 & 4 = You have a couple options here, if you make them date pickers then you can't set their values to to infomative text. You could if you make them text boxes but then you wouldn't get the nice functionality of a date picker.

Either way it's not going to be as nice as coding your own UI.

|||

Thanks for that Adam. At least I can stop searching for an 'nice' answer now as I know it's not possible. I'll go down the route you suggest.

Cheers

Wednesday, March 7, 2012

PAGEIOLATCH_SH wait time is 80%

Hi,
One of my sql job contain 80% read & 20% insert /updates.
This job also contains number of cursor operations. It use to run for 2Hrs
or less and now it runs for 8hrs.
When I check the process wait time. The PAGEIOLATCH_SH is 80% and
PAGEIOLATCH_EX is 10%.
I am not sure what is causing this high PAGEIOLATCH_SH wait time?
Any thoughts on what could be the issue here?
Regards,
Sarav.
Maybe http://sqldev.net/articles/WaitTypes.htm can help you.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>
|||I'm going to venture a guess here, but I'd bet that your use of cursors is
at the root of your problem. Resource utilization by cursors has a way of
growing in non-linear ways. Some of the gurus here might be able to offer
set based solutions if you can succinctly describe the process.
Bob Castleman
SuccessWare Software
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>
|||Hi Sarav
The process wait time % split seems normal to me given your estimate of 80%
read / 20% insert / updates. The PAGEIOLATCH_SH represents the shared locks
taken under the 80% read operations and thePAGEIOLATCH_EX represents the
exclusive locks required to perform the insert / updates.
Perhaps the post re cursors has some merit. I'd also be looking at general
resource availability (memory / cache stats / lock blocks) and whether the
sql job is being blocked by other processes.
HTH
Regards,
Greg Linwood
SQL Server MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>
|||That means you have a heck of a lot of disk access going on. I would ensure
the operations are well tuned first.
Andrew J. Kelly SQL MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>

PAGEIOLATCH_SH wait time is 80%

Hi,
One of my sql job contain 80% read & 20% insert /updates.
This job also contains number of cursor operations. It use to run for 2Hrs
or less and now it runs for 8hrs.
When I check the process wait time. The PAGEIOLATCH_SH is 80% and
PAGEIOLATCH_EX is 10%.
I am not sure what is causing this high PAGEIOLATCH_SH wait time?
Any thoughts on what could be the issue here?
Regards,
Sarav.Maybe http://sqldev.net/articles/WaitTypes.htm can help you.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||I'm going to venture a guess here, but I'd bet that your use of cursors is
at the root of your problem. Resource utilization by cursors has a way of
growing in non-linear ways. Some of the gurus here might be able to offer
set based solutions if you can succinctly describe the process.
Bob Castleman
SuccessWare Software
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||Hi Sarav
The process wait time % split seems normal to me given your estimate of 80%
read / 20% insert / updates. The PAGEIOLATCH_SH represents the shared locks
taken under the 80% read operations and thePAGEIOLATCH_EX represents the
exclusive locks required to perform the insert / updates.
Perhaps the post re cursors has some merit. I'd also be looking at general
resource availability (memory / cache stats / lock blocks) and whether the
sql job is being blocked by other processes.
HTH
Regards,
Greg Linwood
SQL Server MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||That means you have a heck of a lot of disk access going on. I would ensure
the operations are well tuned first.
Andrew J. Kelly SQL MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>

PAGEIOLATCH_SH wait time is 80%

Hi,
One of my sql job contain 80% read & 20% insert /updates.
This job also contains number of cursor operations. It use to run for 2Hrs
or less and now it runs for 8hrs.
When I check the process wait time. The PAGEIOLATCH_SH is 80% and
PAGEIOLATCH_EX is 10%.
I am not sure what is causing this high PAGEIOLATCH_SH wait time?
Any thoughts on what could be the issue here?
Regards,
Sarav.Maybe http://sqldev.net/articles/WaitTypes.htm can help you.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||I'm going to venture a guess here, but I'd bet that your use of cursors is
at the root of your problem. Resource utilization by cursors has a way of
growing in non-linear ways. Some of the gurus here might be able to offer
set based solutions if you can succinctly describe the process.
Bob Castleman
SuccessWare Software
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||Hi Sarav
The process wait time % split seems normal to me given your estimate of 80%
read / 20% insert / updates. The PAGEIOLATCH_SH represents the shared locks
taken under the 80% read operations and thePAGEIOLATCH_EX represents the
exclusive locks required to perform the insert / updates.
Perhaps the post re cursors has some merit. I'd also be looking at general
resource availability (memory / cache stats / lock blocks) and whether the
sql job is being blocked by other processes.
HTH
Regards,
Greg Linwood
SQL Server MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>|||That means you have a heck of a lot of disk access going on. I would ensure
the operations are well tuned first.
--
Andrew J. Kelly SQL MVP
"sarav" <orumurai@.yahoo.cmom> wrote in message
news:ugiqcPlAFHA.2584@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> One of my sql job contain 80% read & 20% insert /updates.
> This job also contains number of cursor operations. It use to run for 2Hrs
> or less and now it runs for 8hrs.
>
> When I check the process wait time. The PAGEIOLATCH_SH is 80% and
> PAGEIOLATCH_EX is 10%.
>
> I am not sure what is causing this high PAGEIOLATCH_SH wait time?
>
> Any thoughts on what could be the issue here?
>
> Regards,
> Sarav.
>

Pageiolatch ??

Hello all,

I have an aggregation job that was taking about 2h on a 20 mil records database. Since some 5 milion new records were inserted 2 days ago, the job is now taking more than 10h. I updated statistics, recompiled all the stored procedures and defraged all the indexes. Still 10h. I deleted those 5 mil records, still 10h. The database file is not fragmented, as it is the only file on that drive. All the data is local, nothing is transferred over the network. Nothing else is running on that machine, just SQL Server. I can see the job having long waiting times, reason being PAGEIOLATCH_UP and PAGEIOLATCH_SH.

Is there something else I can do to bring the job back to 2h?

Thanks a lot! Any idea will be appreciated!Have you tried rebuilding the indexes? I have found that when SQL Server indexes get heavy insert/delete action without rebuilding, they can sometimes give unexpectly big performance issues. (Defraging them did not make a lot of difference)|||Yes, tried it ... no luck :-(

Thanks!

Originally posted by dbabren
Have you tried rebuilding the indexes? I have found that when SQL Server indexes get heavy insert/delete action without rebuilding, they can sometimes give unexpectly big performance issues. (Defraging them did not make a lot of difference)