Viewing 15 posts - 511 through 525 (of 7,614 total)
(less than 8 pages goes on mixed extents
For SQL 2017 (or SQL 2016, for that matter), only if for some odd reason you've set MIXED_PAGE_ALLOCATION ON and/or allowed...
March 2, 2023 at 11:13 pm
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that uses...
March 2, 2023 at 9:19 pm
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that uses singular table...
March 2, 2023 at 8:22 pm
DECLARE @sum INT;
SELECT @sum = 60 * SUM(CAST(PARSENAME(REPLACE(x, ':', '.'), 2) AS INT)) + SUM(CAST(PARSENAME(REPLACE(x, ':', '.'), 1) AS INT))
FROM (
...
March 2, 2023 at 6:37 pm
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that uses singular table names in...
March 2, 2023 at 6:35 pm
Tables are typically plural.
I don't see why "user" should be in any of these names.
So maybe:
orgs ( orgId int, orgName varchar(100) )
orgTypes ( orgTypeId smallint, orgType varchar(50) )
orgSiteTypes ( orgSiteTypeId...
March 2, 2023 at 3:55 pm
DROP TABLE IF EXISTS #data;
CREATE TABLE #data ( trip_duration varchar(30) NOT NULL );
INSERT INTO #data VALUES
('23:01'), ('00:01'), ('05:15'), ('00:45'), ('00:11');
SELECT
...
March 2, 2023 at 3:17 pm
SELECT field, SUBSTRING(field, PATINDEX('%[2][0-9][0-9][0-9]%', field), 4) AS year
FROM #t March 1, 2023 at 2:53 pm
None that I'm aware of. It's actually an excellent place to store that type of info.
Just be sure you don't drop the table, or you'll lose all the ext props!
March 1, 2023 at 12:30 am
;WITH test_data AS (
SELECT 'A~B~C.ab' AS data
UNION ALL
SELECT 'D~E~FG.hij'
)
SELECT data, data_result
FROM test_data
CROSS APPLY (
...
March 1, 2023 at 12:19 am
You would also want to check what the FK DELETE options are on each table. For the ones that are CASCADE, that could cause updates in other tables as well...
February 28, 2023 at 3:15 pm
The way I figured it:
Currently you have 10 files * 100GB reserved = 1000GB.
If you drop each file to 85GB, you'll have 850GB reserved, i.e., 150GB less. On a drive...
February 23, 2023 at 9:34 pm
Shrink files 3 thru 8 to, say, 85GB. Then, wait a while. Once the tempdb file sizes get more balanced out, shrink files 1 and 2 back to 85GB. Ultimately...
February 23, 2023 at 9:09 pm
As for renaming the file, do not use detach; that's an obsolete method. Instead, issue an ALTER command to change the file name, take the database offline, rename the physical...
February 23, 2023 at 3:11 pm
Broadly speaking, SQL Server performance comes down to indexes (assuming you don't have major issues with RAM, disk I/O, other basics).
Therefore, first I'd suggest reviewing your indexes for performance. Unfortunately,...
February 22, 2023 at 7:57 pm
Viewing 15 posts - 511 through 525 (of 7,614 total)