Viewing 15 posts - 1 through 15 (of 30 total)
I have another requirement:
CREATE TABLE #test (theDate DATE, value int, flag int);
select * from #test
INSERT INTO #test VALUES
('20210109', 12, 1),
('20210109', 12, 0),
('20210131', 12, 0),
('20210131', 12, 0),
('20210131', 12, 0),
('20210225', 23, 1),
('20210225',...
June 28, 2021 at 8:41 pm
Thanks for replying everyone! Sorry I should have posted create scrip as well
June 28, 2021 at 8:38 pm
query cost was mostly sorting (80%). I created the non-clustered index on columns Infocode and ExchIntCode but no change in performance.
April 13, 2021 at 2:44 am
Those are some great suggestions .I started with :
Question: Do I need :...
September 22, 2020 at 5:21 pm
Thanks for all your reply!
Putting OPTION (QUERYTRACEON 9481); at the end of the query did the magic.
August 26, 2020 at 11:46 pm
Also, I have rebuild the index and I checked to make sure that all index and stats were same as in the old sql 2012 machine.
sELECT name AS index_name,STATS_DATE(OBJECT_ID, index_id)...
July 14, 2020 at 2:04 am
Hi Grant,
What concerning is that same query is running faster in 2012. I would look at the query and execution plan but at this point of stage in this project,...
July 14, 2020 at 12:57 am
HI David,
tempdb is configured the same way on both machines. But I have Compatibility level to 2012 (110) and Legacy Cardinality Estimation to TRUE on sql 2016 temodb as well....
July 12, 2020 at 5:38 pm
Most of the performance is good but one of my SSIS package that is deployed in both old ( 2012) and new (2016) has significant performance differences. Tht SSIS package...
July 8, 2020 at 12:48 am
Thanks for your suggestion. I was aware of the cardinality factor and applied this already to new sql 2016 machine.
July 6, 2020 at 5:20 pm
is this a better way to do this?
SELECT *
FROM sys.configurations
---where value_in_use = 1
ORDER BY name ;
GO
July 6, 2020 at 4:24 am
Als , does it make sense to replace
EQY_FUND_IND =
coalesce ((SELECT TOP 1 i.Name FROM dbo.#Entity e2
LEFT join [dbo].[#EntityIndustry] ei ON ei.MasterEntityId = e2.MasterEntityId
----AND @AsOfDate between ei.ValidFromDate and ei.ValidToDate
left join [dbo].[Industry]...
June 7, 2020 at 12:27 am
Those are some amazing suggestions. Thanks!
I will change the script and hopefully see the benefit. Do you recommend any non-clustered indexes?
June 6, 2020 at 11:07 pm
alter PROCEDURE [dbo].[spGetEntities_RO_test]
---1:19:15
@AsOfDate date = '9999-12-31',
@PrivateMarketStatus bit = 0
as
SET NOCOUNT ON;
select CountryOfIssueId,
MasterEntityId,
ValidFromDate,
ValidToDate,
CountryOfIncorporationId,
CountryOfDomicileId,
MarketStatusId,
PrimaryCurrencyId,
PrimaryExchangeId,
SourceEntityId,
Name,
PrimaryExchangeTicker,
TickerExchangeCode,
RecentPeriodEndDate,
EntityId,
RecentSemiEnd,
RecentQuarterEnd,
RecentQuarterEndDate,
RecentBSPeriod,
IsCurrent
into dbo.#Entity
from [dbo].[Entity]
where @AsOfDate between ValidFromDate and ValidToDate
CREATE CLUSTERED INDEX...
June 6, 2020 at 10:01 pm
Viewing 15 posts - 1 through 15 (of 30 total)