Viewing 15 posts - 6,856 through 6,870 (of 7,616 total)
FYI, in case you want it, here's the query I use to get an overview of tables, indexes and their sizes:
SELECT
SCHEMA_NAME(o.schema_id) AS Schema_Name,
...
January 30, 2013 at 2:36 pm
vlad-548036 (1/30/2013)
declare @howMany int=3
insert top (@howMany)
can be used to force insertion...
January 30, 2013 at 2:29 pm
AndrewSQLDBA (1/29/2013)
I was in a discussion with a DB2 developer ...
He was trying to convince me that char is better performing than varchar
Andrew SQLDBA
First, let's be grateful he's a developer,...
January 30, 2013 at 10:16 am
Yes, shrinking log file routinely or unnecessarily is bad.
But A log shrink after an unusually extreme amount of activity would not be.
January 30, 2013 at 10:07 am
ChrisM@Work (1/30/2013)
Mr. Kapsicum (1/30/2013)
...i want my query to use BOTH ISNULL and COALESCE...
Only homework would impose such a restriction.
Yep; I'm sure of that too. 100% homework (or bad interview...
January 30, 2013 at 10:04 am
No, no syntax errors per se, but that method's not guaranteed to work safely either.
January 30, 2013 at 10:00 am
insert dbo.N
output inserted.$identity into #tmp ( i )
default values
go 3
select *
from #tmp
January 29, 2013 at 4:09 pm
You may or may not need partitioning.
But you absolutely need to determine the proper clustered index for the table.
It's the column(s) you (almost) always specify in a WHERE clause, particularly...
January 29, 2013 at 4:02 pm
I think you can eliminate the problem, and a full table scan, like below.
Whiile this makes your initial q moot for this specific example, it could naturally still be good...
January 29, 2013 at 3:44 pm
ChrisM@home (1/29/2013)
GilaMonster (1/29/2013)
ChrisM@Work (1/29/2013)
January 29, 2013 at 2:19 pm
PiMané (1/29/2013)
January 29, 2013 at 1:26 pm
The real key to performance is the proper clustered index.
If you (almost) always query [dbo].[XmlDataModel] by [ExerciseYear], then cluster by [ExerciseYear] followed by any other column(s) you (almost) always query...
January 29, 2013 at 12:21 pm
Not 100%, as I don't have any table definition to look at.
But if fromdate and todate are both in the text format above, then something like:
SELECT
...other_columns...
...
January 28, 2013 at 4:51 pm
select
convert(varchar(20), cast(stuff(substring(string, 5, 15), CHARINDEX(':', substring(string, 5, 15)) - 3, 0, RIGHT(string, 5)) as datetime), 120)
from (
select 'Mon...
January 28, 2013 at 1:08 pm
Igor Makedon (1/28/2013)
Are the folowing two SELECT statements equvalent (i.e. -- see my original question, -- "return exactly the same row set" no matter "what data is")?
[font="Courier New"]SELECT xx FROM...
January 28, 2013 at 11:26 am
Viewing 15 posts - 6,856 through 6,870 (of 7,616 total)