Viewing 15 posts - 601 through 615 (of 2,894 total)
Sergiy (3/13/2013)
It will take ages lust to parse it.
For million rows uploads there are...
March 13, 2013 at 4:01 am
Minnu (3/13/2013)
Daily am taking the size of databases using "EXEC SP_Databases" and updating in a excel file manually,
DATABASE_NAME|DATABASE_SIZE|REMARKS
now i want to create a job to execute the above query...
March 13, 2013 at 3:56 am
Hawkeye_DBA (3/12/2013)
Thanks,yes, without the column it uses the index.
The execution time is 1m 24s
So, just taking Text column out of your table takes 1 m 24 seconds?
What...
March 13, 2013 at 3:07 am
Sergiy (3/12/2013)
Single INSERT INTO with UNION ALL in SELECTs will be waaaay faster.
UNION ALL million rows? I don't think so!
What is the source? Where data coming from?
BTW. Million separate...
March 13, 2013 at 3:01 am
So you are saying that if you remove text column from query you have index seek?
so the following query should use index seek then:
SELECT
COLMAIN_ID, COL1, COL2, COL3, COL4,
COL5,...
March 12, 2013 at 11:47 am
Hawkeye_DBA (3/12/2013)
SELECT
COLMAIN_ID, COL1, COL2, COL3, COL4,
COL5, COL6, COL7, COL8, COL9,
COLText_10, COL11, COL12, COL13, COL14,
COL15, COL16, COL17_PK, COL18, COL19,...
March 12, 2013 at 11:20 am
Hawkeye_DBA (3/12/2013)
Thanks for your reply 🙂And, you're right, making it a full-text index is irrelevant for this query.
I can't change the data type unfortunately, other ideas are welcome!
Thanks again
Again, you...
March 12, 2013 at 11:04 am
fixed in my post...
just replace
DATEDIFF(second,@LastFlaggedLogTime, Logtime) >= 2
with
DATEDIFF(millisecond,@LastFlaggedLogTime, Logtime) >= 2000
March 12, 2013 at 10:54 am
... Similarly you can make a NOT NULL column NULL-able by wrapping it with NULLIF.
... or CASE WHEN where relevant.
March 12, 2013 at 10:49 am
Don't use cursors!
You can do it with quirky update method:
CREATE TABLE #TEMP (LogIndex int, UserID nvarchar (10), LogTime datetime)
insert into #TEMP select 1, '01551', '20/02/2013 17:41:45.000' --ok
insert...
March 12, 2013 at 10:36 am
What exact SELECT query you want to optimize?
Are you doing text search? If not, then creating full text index is irrelevant.
Why do not change your TEXT column to VARCHAR(MAX)...
March 12, 2013 at 9:56 am
Let me one guess (just a specualtion). Do you want values split to columns? If so, just use the udf like that:
SELECT *
INTO #test
FROM...
March 12, 2013 at 9:54 am
AndrewSQLDBA (3/12/2013)
I was actually looking for something else. That really did not help.Andrew SQLDBA
Ok, then could you please provide a bit more details about what you have and expected you...
March 12, 2013 at 9:45 am
If exists(select 1 from table where....) or even select top 1 col1 from table where....
"EXISTS" will be faster anyway, regardless what you really select inside of it, as this bit...
March 12, 2013 at 9:17 am
Jeff Moden (3/12/2013)
Column_name Type Computed Length Prec Scale Nullable TrimTrailingBlanks FixedLenNullInSource Collation
----------- ---- -------- ------ -----...
March 12, 2013 at 9:10 am
Viewing 15 posts - 601 through 615 (of 2,894 total)