Viewing 15 posts - 7,126 through 7,140 (of 7,597 total)
Jeff Moden (10/3/2012)
sqlserver12345 (10/2/2012)
Ex:350 days = 50 0/7 weeks
351 days = 50 1/7 weeks
352...
October 4, 2012 at 8:40 am
Jeff Moden (10/3/2012)
ScottPletcher (10/3/2012)
Customer ids are usually unique and ever-increasing; narrowness is sometimes...
October 4, 2012 at 8:36 am
Jeff Moden (10/3/2012)
Use the clustered index for a more appropriate column
For large tables, the "appropriate column" is usually unique, narrow, and ever-increasing. "Customer Code" columns almost never meet all...
October 3, 2012 at 4:57 pm
--
--
SELECT
col1, col2, days,
CAST(days / 7 AS varchar(5)) + ' ' + CAST(days % 7 AS varchar(1)) + '/7' AS weekdays
FROM...
October 3, 2012 at 4:22 pm
Backup and restore requests.
I've done away with a lot of the "requests" -- just provide 'em a stored proc that can be run to do the backup. The stored...
October 3, 2012 at 4:11 pm
Eugene Elutin (10/3/2012)
ScottPletcher (10/3/2012)
...
Why would the relative position of the column make the slightest bit of difference at all?
It may effect page splits and re-writes.
?? How is that??
Fixed-length columns...
October 3, 2012 at 3:56 pm
An uncontrolled MIN() could fail as other Statuses appear in the table.
I suggest directly coding for the specific condition you are looking for:
SELECT
Product,
...
October 3, 2012 at 12:29 pm
In this case ;-), I think a simple CASE will do exactly the same thing:
SELECT TOP 1
CASE WHEN Col1 IS NULL THEN 1 WHEN...
October 3, 2012 at 12:17 pm
Along those lines, make sure the statistics are up to date on the tables on the server as well.
Also, a quick checklist of a few things to look at on...
October 3, 2012 at 12:04 pm
Actually, Brendan, what you're described is what I've seen over and over.
While well intentioned, such processes usually end up being roadblocks rather than welcome centers (to stay with the road...
October 3, 2012 at 11:56 am
So I guess there's no issue with rows being UPDATEd / DELETEd while the new table is being created?
Or with the potential lock outs/delays to current modifications during the export...
October 3, 2012 at 9:10 am
ChrisM@Work (10/3/2012)
ScottPletcher (10/2/2012)
Therefore, I suggest using a lookup table, as suggested by others. You absolutely...
October 3, 2012 at 8:57 am
Eugene Elutin (10/2/2012)
...
Given that a customer's name can change, perhaps it is an attribute of the purchase.
...
Given that nothing in the Universe is constant and everything can change,...
October 3, 2012 at 8:45 am
Typically customer codes are sequential. Since they're not here, that would definitely make the clustering key choice much more difficult.
If customer code is (almost) always used for lookups/processing, you...
October 3, 2012 at 8:43 am
Eugene Elutin (10/2/2012)
ScottPletcher (10/2/2012)
sql-lover (10/2/2012)
bteraberry (10/2/2012)
ScottPletcher (10/2/2012)
Maybe I'm missing something.Why not just ALTER the column to be a bigint instead of an int?
He said these are very big tables. ...
October 3, 2012 at 8:29 am
Viewing 15 posts - 7,126 through 7,140 (of 7,597 total)