Viewing 13 posts - 91 through 103 (of 103 total)
GilaMonster (12/20/2016)
2) Corollary to #1: does a query against the view utilize the indexes on the table for better performance?
Maybe. Depends whether SQL uses the indexed view or goes to...
December 20, 2016 at 3:40 am
A) I've got this working. I couldn't work out how to dynamically build CREATE INDEX code from an existing table, so this is hard coded in external .sql files.
B)...
September 27, 2016 at 7:59 pm
Smendle (9/7/2016)
Why not just bulk load into a staging table then index as needed then drop main-table and rename the staging table?
I've written a Powershell script which does the following...
September 22, 2016 at 5:33 pm
I've searched some more, and now realize that I can't disable the clustered index and have bulk inserts work.
What I really need is a way to drop all indexes (convert...
September 7, 2016 at 12:16 am
pietlinden (9/4/2016)
http://stackoverflow.com/questions/11301383/automatically-drop-and-recreate-current-indexes
EXEC sp_MSforEachTable 'ALTER INDEX ALL ON ? DISABLE'
and
EXEC sp_MSforEachTable 'ALTER INDEX ALL ON ? REBUILD'
is all you need if you want to...
September 6, 2016 at 10:32 pm
I meant automatically, as the row is created.
I'll implement this as a trigger. If there's a better approach please let me know.
August 3, 2016 at 10:35 am
Let me restate the question then...
If I run this code:
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[tmp].[DF_mytable_recnum]') AND type = 'D')
BEGIN
ALTER TABLE [tmp].[mytable] DROP CONSTRAINT [DF_mytable_recnum]
END
GO
IF ...
August 3, 2016 at 1:28 am
Hmmm...I may need to rethink this...
My code works for the lookup columns...but fails miserably on the non-lookup columns. D'oh.
I either:
1) Need to add an additional update for all the...
May 31, 2015 at 8:07 am
Yep, I ran into this after posting.
Here is my current code against my "real application" tables:
drop trigger vFact_Cases_Instead_Update
go
create trigger vFact_Cases_Instead_Update
on vFact_Cases
instead of update
as
begin
set nocount on
--select * from inserted
--select * from...
May 31, 2015 at 7:41 am
Ok, this code works. My "real application" will need to update 8 dim table FK's in the fact table. The dim tables aren't large (< 1K rows), so...
May 31, 2015 at 3:58 am
Thanks that certainly helped performance - down from 40 seconds to 1 second!. And now that I see the code, it makes sense, reducing the passes over the data.
Payments...
July 21, 2014 at 12:25 am
I've made progress on this issue, and have a view which works, except 1) I'd prefer it was editable (for the WriteOff table's columns), and 2) it would be good...
July 17, 2014 at 11:23 pm
I'm used to being able to specify an order by in a view in other dialects of SQL. I find it handy.
Rather than Microsoft deprecating (or silently...
July 15, 2014 at 7:51 am
Viewing 13 posts - 91 through 103 (of 103 total)