Cost Of Re-using Dialogs - Why Recycle Them?
Aug 27, 2007
After lots of testing I have found that re-using dialogs improves performance significantly, however I cannot fathom out what is the cost of re-using them. Performance does not come for free hene why I feel there is a cost. Can anyone shed any light on the cost of re-using dialogs? Also why should you re-cycle them? What benefits does recycling dialogs have?
Many thanks
David
View 1 Replies
ADVERTISEMENT
May 28, 2015
I need to build TSQL query to return the Last unit Cost from my table of movement of goods SL (on CTE) but the MAX(Datalc) must be Less or Equal to my HeaderInvoice.
This is my script:
With MaxDates as (
SELECT ref,
MAX(epcpond)[Unitcostprice],
MAX(datalc) MaxDate
FROM sl
[code]....
the problem I have right now is that the Unitcostprice of my table of goods movements has a top date greather than the date of my bill.
Example:
invoice date : 29.01.2015 unitcost on invoice line = 13,599722
Maxdate (CTE) : 19.03.2015 unitCost from my table of movement of goods = 14,075
That ´s not correct because the MAxdates > invoice date and the unitCost of 14,075 is the cost on 19.03.2015 and not just before my invoice date.
View 4 Replies
View Related
Jul 3, 2014
I right in thinking that if the estimated subtree cost is higher than the cost threshold for parallelism then it will use a parallel plan? If so, I've read the cost threshold is measured in minutes but is the subtree cost measured in something else, the mysterious cost number? And if so, how are the two compared?
View 9 Replies
View Related
May 17, 2008
Is there any way to recycle SQL Server memory, other than restarting the service? Should we restart the service on schedule? The memoy goes high and once high it stays there. SQL Server is not releasing it...
View 2 Replies
View Related
Aug 28, 2006
Hi There
SInce day one i have configuring service broker to use transport and dialog security with certificates.
However i am not 100% sure how to setup service broker between 2 instances without security.
Would the following work, or what steps am i missing?
1.Setup the endpoint with WINDOWS authentication instaed fo certificates, the instances are in the same domain, grant necessary permission to the service account for each instance.
2.Create dialogs with the create remote service bindings with the anonymous = ON and grant send to public for the services.
Would this work? Also am i correct in thinking that if encryption is required the use of certificates is mandatory?
Thank YOu
View 5 Replies
View Related
Oct 23, 2006
I was looking at a means of reusing dialogs.
The attempt I tried was looking up an existing dialog in the conversation_endpoints.
However on doing a scale test I would that the non blocking I was hoping wasn't happening. Even through I was giving each spid a new dialog by using a conversation_group_id related to the spid. I found that the following SQL was blocked by a transaction that contains a begin dialog. This suggests the locking on conversation_endpoints is too excessive.
select top 1 conversation_handle
from sys.conversation_endpoints ce
join sys.services s on s.service_id = ce.service_id
join sys.service_contracts c on c.service_contract_id = ce.service_contract_id
where s.name = 'jobStats'
and ce.far_service = 'jobStats'
and (ce.far_broker_instance = @targetBroker OR @targetBroker = 'CURRENT DATABASE')
and ce.state IN ('SO','CO')
and ce.is_initiator = 1
and (ce.conversation_group_id = @conversation_group_id )--or @conversation_group_id is null)
and c.name = @contractName
View 2 Replies
View Related
May 21, 2013
We have an App server where Microsoft reporting services (report Builder 2005) is hosted and the backend Database server which is used by the reporting services.
The clients create very complex reports (usually towards month end) and run against the database causing the tempdb grow expenentially, leading to perfromance degradation and worst case space issues.Our only solution is to reboot the server.
There should be many systems which sould be having similar scenarios like mine. How to handle the scenario.usually in my database tempdb should be below 15GB... but it had grown to 60GB in some instances.
View 27 Replies
View Related
Aug 28, 2007
I wrote some code to insert some data into a table, if the record already exists overwrite, etc. I've never done something like this so
I am going to bang my head against that for a while. But when I did an execution plan I got
Index Seek Cost : 105 %
How do I get more than 100% and what does that mean?
Thanks,
Jim
View 3 Replies
View Related
Aug 7, 2004
hi there,
i have a site that has high traffic on it...and ofcourse there is search on the site...
one of the search options is to search by name, so i use a stored procedure as following :
select StID,StName from StudentTable where StName like '%' + @SearchField + '%'
ofcourse it works perfectly, the problem that it has a really high cost on the sql server..
so is there any way i can search for the name and using the '%' with lower cost, noting that the name is of type varchar(100)
Thanks in advance
Mahmoud Manasrah
View 4 Replies
View Related
Nov 30, 2004
OK, this should be an easy one but my brain isn't quite working right now.
I have a table, we'll call Table1 like so:
ProductID Supplier Cost
12345 A 14.50
12345 B 13.49
12345 C 12.00
43222 A 15.00
43222 B 15.21
43222 C 13.99
12312 B 14.00
15421 A 21.99
15421 C 20.00
And I want to Get the name of the Supplier with the Lowest cost,
I know I can go like:
SELECT ProductID, MIN(Cost) FROM Table1 GROUP BY ProductID
and get the lowest cost, but what would be the most effiecent way to get all three fields returned by the query? I need the ProductID, Supplier and Cost.
Thanks,
View 7 Replies
View Related
Aug 8, 2003
Is there a way that we can figure out what the cost of a SQL query is via jdbc ? any command etc?
View 1 Replies
View Related
Apr 21, 2015
I am querying a database that has hours worked listed by pay rate. I want to return sum of hours per pay rates I have been given but hours are stored in multiple columns. So If I run the below query for one worker it returns.
HoursBill_rate_1 Hours_2Bill_rate_2
34.2610.26 0.000.00
5.7410.26 5.689.67
I want to report to the business:
40hrs 10.26
5.68 9.67
The query I have written is below:
Select Sum(Hours_1) As Hours,Bill_rate_1,Sum(Hours_2) as Hours_2,Bill_rate_2--,Hours_3,Bill_rate_3
From Valid_Timesheets
Where (Department = '938' and tax_period = 3 and tax_year = 2015 AND PERSONNEL_REF = '991A001198') and
((Bill_Rate_1 = £10.26 or
Bill_Rate_1 = £9.67 or
Bill_Rate_1 = £8.27 or
[Code] ....
View 4 Replies
View Related
Aug 13, 2007
Hi,
Does anyone know how much storage space is required in SQL Server for a char(1) compared to a varchar(1)?
If I have a table with 14 varchar(1) fields and 60652902 rows, how much is this overhead costing me in wasted space?
Answers on a postcard!
Thanks,
Richard.
View 4 Replies
View Related
Mar 11, 2008
I have 2 different queries which produce same result. I want to know which querry is better and why?
The query is used to display the employee details who is handling the maximum number of project.
Queries are the following
Query A
Code Snippet
SELECT EmployeeDetails.FirstName+' '+EmployeeDetails.LastName AS EmpName,
COUNT(LUP_EmpProject.Empid) AS Number_Of_Projects
FROM LUP_EmpProject
INNER JOIN EmployeeDetails
ON LUP_EmpProject.Empid=EmployeeDetails.Empid
GROUP BY EmployeeDetails.FirstName+' '+EmployeeDetails.LastName,
LUP_EmpProject.Empid
HAVING COUNT(LUP_EmpProject.Empid)>0
AND COUNT(LUP_EmpProject.Empid)=(SELECT
MAX(Number_Of_Projects)
FROM (SELECT COUNT(LUP_EmpProject.Empid) Number_Of_Projects
FROM LUP_EmpProject
GROUP BY LUP_EmpProject.Empid)AS sub)
Query B
Code Snippet
SELECT LUP_EmpProject.EmpID,
EmployeeDetails.FirstName + ' ' + EmployeeDetails.LastName AS EmpName,
COUNT(*) AS NumberOfProjects
FROM LUP_EmpProject
INNER JOIN EmployeeDetails
ON LUP_EmpProject.EmpID = EmployeeDetails.EmpID
GROUP BY LUP_EmpProject.EmpID,
EmployeeDetails.FirstName + ' ' + EmployeeDetails.LastName
HAVING COUNT(*)=(SELECT
MAX(Number_Of_Projects)
FROM (SELECT COUNT(LUP_EmpProject.Empid) Number_Of_Projects
FROM LUP_EmpProject
GROUP BY LUP_EmpProject.Empid)AS sub
Please Help!!!!!!!!!!!!!!!!1
View 2 Replies
View Related
Sep 28, 2006
I've converted most SQL Server databases to unicode since the AS 400 stores data in unicode (UTF-16). So far the only difference I see is that running queries to text in Unicode takes a lot longer, and UTF-16 files are 4x as large as Cp1252 files.
Any way to get the file sizes / query times of old with Unicode?
View 3 Replies
View Related
Mar 28, 2006
I wanna used derived fields to improve select performance of my system.
How can I calculate the trigger cost in the system?
View 18 Replies
View Related
Nov 13, 2013
If I run sample query below against an adventureworks database
where can I find query cost?
USE AdventureWorks;
GO
EXEC dbo.uspGetManagerEmployees 140;
Does estimated subtree cost for in the actual execution plan (when right click SELECT operator in the execution plan) is considered query cost?
View 3 Replies
View Related
Aug 29, 2007
hello,
Does anybody knows how to calculate cost of query ? Any help link or something.
--kneel
View 6 Replies
View Related
Feb 8, 2007
has anybody investigated the cost of turning on AUDITING for the SQL servers? I am talking about enabling the entire C2 Security Audit mode. How much impact the auditing has on the database performance?
Is auditing for SQL 2005 any better, meaning less impact on performance?
Any sample, test, and/or numbers to support the arguments?
Please share any findings that you have or know. Thanks
View 1 Replies
View Related
May 26, 2006
I have been told that many ETL tools used to cost hundred of thousands of dollars. Is this true or were they referring to the ETL and Analysis tools, together? Can anyone provide some actual product names and estimated "costs" that hits these marks?
TIA,
barkingdog
View 3 Replies
View Related
Jun 22, 2006
im try to get the subtree cost (sql server 2000) back from a dynimic sql query that i build on the fly.. the sql query is:
SET SHOWPLAN_ALL ON GOselect * from mp_Contacts Where FirstName = 'Jason' --my queryGOSET SHOWPLAN_ALL OFF GOGO
the c# code is:
<code>
Decimal HoldSubTree;
// Make Connection
SqlConnection FindSubTree = new SqlConnection(Utilities.GetCRMEnvironment());
//Sql Connection
System.Text.StringBuilder SHOWPLANALLON = new System.Text.StringBuilder("SET SHOWPLAN_ALL ON");
System.Text.StringBuilder SHOWPLANALLOFF = new System.Text.StringBuilder("SET SHOWPLAN_ALL OFF");
System.Text.StringBuilder SubTreeSql = new System.Text.StringBuilder(MySqlString.ToString() + " ");
// Grab the data and fill the dataset
SqlCommand SubTreemyCommand = new SqlCommand(SHOWPLANALLON.ToString(), FindSubTree);
SubTreemyCommand.CommandTimeout = 90;
SubTreemyCommand = new SqlCommand(SubTreeSql.ToString(), FindSubTree);
SubTreemyCommand.CommandTimeout = 90;
SqlDataAdapter SubTreemyDA = new SqlDataAdapter();
SubTreemyDA.SelectCommand = SubTreemyCommand;
DataSet SubTreemyDS = new DataSet();
SubTreemyCommand = new SqlCommand(SHOWPLANALLOFF.ToString(), FindSubTree);
SubTreemyCommand.CommandTimeout = 90;
try
{
SubTreemyDA.Fill(SubTreemyDS);
</code>
and the result: it bring back the rows of data from the dynimic query instead of the subtree cost..
how could i send 3 statements to the sql database but all in the same transaction.. for example:
first the server would switch modes:
"SET SHOWPLAN_ALL ON"
then i would send it my query:
"select * from mp_Contacts Where FirstName = 'Jason' "
and then switch the server back over:
"SET SHOWPLAN_ALL OFF"
Is this possible?? ideas??
View 1 Replies
View Related
May 25, 2006
We use SQL Server 2005 and we use lots of stored procedures. Each time a stored procedure run we log the name, execution time and username so we can identify trends and long-running procedures.
I would like to add the actual CPU and IO cost of execution to this log. Is there a way to get it? This type of information is viewable in SQL Server's performance tools - so there must be some way to get it.
Can someone point me in the right direction please?
Thanks!
View 3 Replies
View Related
Mar 1, 2004
Hi,
We are in need of a JDBC driver (version 3) to support some autonumbering in SQLServer. We've found a couple, very expensive stuff (JTurbo & DataDirect), these drivers can be more expensive than a SQLServer license. Any other ideas/sources?
Thanks,
Bob
View 1 Replies
View Related
Sep 24, 2014
I have a query i have been optimizing. Now runs in about 15 minutes but was wondering if there is any way tr educe the SORT cost.
Currently the high costs left are the Table insert which is 58% and the Sort cost of 36%
The inner query below is around 400million rows and aggregates to around 15,000,000 rows)
SELECT@1 = DateKey FROM dbo.DimDate WHERE TheDate = CAST(DATEADD(WEEK, -1, GETDATE() -1) as DATE)
SELECT@2 = DateKey FROM dbo.DimDate WHERE TheDate = CAST(DATEADD(WEEK, -2, GETDATE() -1) as DATE)
SELECT@3 = DateKey FROM dbo.DimDate WHERE TheDate = CAST(DATEADD(WEEK, -3, GETDATE() -1) as DATE)
SELECT@4 = DateKey FROM dbo.DimDate WHERE TheDate = CAST(DATEADD(WEEK, -4, GETDATE() -1) as DATE)
SELECT@5 = DateKey FROM dbo.DimDate WHERE TheDate = CAST(DATEADD(WEEK, -5, GETDATE() -1) as DATE)
[code]....
View 9 Replies
View Related
Jul 20, 2005
I have enabled the query governor on our SQL2000 SP2 server with athreshold of 3600. Now, some of the maintenance jobs fail due to thelimit being to low (e.g. one of the user databases integrity checkfails nightly).I have tried to put the command 'SET QUERY_GOVERNOR_COST_LIMIT 0' justbefore the line in the step which reads 'EXECUTEmaster.dbo.xp_sqlmaint N'-Plan etc'but it has no effect.Does anyone know how to get around this situation without usingsp_configure to change the query governor settings at a systemwidelevel?GC.
View 2 Replies
View Related
Apr 13, 2008
what does query cost(retrive to the batch) mean in execution plan?
what is the differeence between query cost :100% and 65%?
View 3 Replies
View Related
Jun 19, 2006
Hi all
I have got 3 columns in my table- start date,finish date and cost..in the
following format...
start_date finish_date cost
12/12/2000 20/12/2000 $2000
01/09/2000 12/10/2000 $400
Now if the month and year of the start and finish date is same, the cost
remains same...
but if the month of the two dates are different, i have to distribute the
cost between the two months by calculating the cost for the number of days
for both of the months..
but i am not able to figure out how?
i am using sql 2005 ..
my table has got about 1 million rows...
pls help.....dll is as followsGO
CREATE TABLE [dbo].[DSS](
[Service Start] [datetime] NULL,
[Service End] [datetime] NULL,
[FMIS Code] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
[Client NHI] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
[No of Units] [float] NULL,
) ON [PRIMARY]
View 5 Replies
View Related
Jul 25, 2005
I am collecting cost and other information for my manager who is
willing to set up an "in house" web dev dept. Will SQL server
express always be free? What does it lack from the regular
version of SQL server? How would it compare with other DB's available
for web use. This isn't a retooled Access thing, is it?
View 2 Replies
View Related
Nov 9, 2005
i am trying to find it, the only thing the MS site shows is enterprise
licensing. is the developer edition still going to be like $100 or
whatever it was?
View 1 Replies
View Related
Jan 7, 2015
I've a table similar to the one below, with a SKU, Category and Cost, and need using a simple select command, split the cost in two columns one for each category (1,2), I used a self-join, and it works, but it doesn't show values not equal in both categories
Declare @Tmp_SKUCatValue Table(
SKU char(7)
,Cetegory Int
,Unit_cost Decimal
);
INSERT INTO @Tmp_SKUCatValue (SKU, Cetegory,Unit_cost)
Values
('sku-001',1,120)
[code].....
The result is as
SKU----------UCost_Cat1-----UCost_Cat2
sku-001------120--------------222
sku-002------126--------------228
sku-003------132--------------234
sku-004------138--------------240
sku-005------144--------------246
-----------------------------------------------------------
but missing the following lines,
SKU----------UCost_Cat1-----UCost_Cat2
sku-006------333--------------null
sku-007------null--------------444
Is ok to not show sku-008 as it is not part of category 1 or 2?
View 2 Replies
View Related
Sep 7, 2014
how to reduce the cost of clustered index insert ?
View 8 Replies
View Related
Sep 11, 2013
I need calculating a rolling 3 month average cost from the two dataset below. Which is the 3 month Average of Dataset1 / Dataset 2.
Dataset 1:
SELECT(factAdmissions.ContractCode + '-' +factAdmissions.BenefitPlanCode) AS [Contract Code],
factAdmissions.AdmitCCYYMM,
ISNULL(sum(AmountPaid),0)As [Amount Paid]
FROM factAdmissions
[Code] ....
Dataset2:
Select
(factMembership.ContractCode+'-'+ factMembership.BenefitPlanCode) As Product,
EffectiveCCYYMM,
ISNULL(count(Distinct MemberId),0) As MemberCount
From factMembership
Where EffectiveCCYYMM >= '200701'
[Code] ....
View 20 Replies
View Related
Aug 6, 2007
Hi everyone,
I am looking for sql monitoring tool. I have found tools from Idera and Quest but the price is a bit expensive.
The tool I am lloking for is able to show historical information such as CPU/memory/disk usage.
Any good suggestion? Thank you in advance.
View 1 Replies
View Related