Viewing 15 posts - 916 through 930 (of 2,171 total)
Run this query instead
SELECT DISTINCTMID,
MM AS mm,
YYYY AS yyyy,
DATEADD(MONTH, 12 * YYYY - 22801 + mm, '19000101') AS DateStart,
DATEADD(MONTH, 12 * YYYY - 22800 + mm, '19000101') AS monthEndDate,
'M' AS...
May 19, 2008 at 7:08 am
Karthik, you really don't pay attention to earlier suggestions made to you, do you?
Here is your code
SELECTMID,
MIN(YYYY * 100 + MM) % 100 AS mm,
MIN(YYYY * 100 + MM) /...
May 19, 2008 at 7:05 am
I think people are tired of answering same question over and over again.
May 15, 2008 at 6:03 am
Sandy (5/15/2008)
FORCESEEK is available in SQL Server 2008, not SQL Server 2005.
here I wants to know, Is there any new join concept added to SQL Server 2008. (apart from Inner...
May 15, 2008 at 2:44 am
It was just an example.
An index seek is more likely to be faster than index scan.
So when you investigate the query using index seek and see that index seek occupies...
May 15, 2008 at 2:13 am
Hasan Mansur (5/14/2008)
In these situations , you can use FORCESEEK table hint. For more details look http://msdn.microsoft.com/en-us/library/bb510478(SQL.100).aspx
FORCESEEK is available in SQL Server 2008, not SQL Server 2005.
http://sqlserver.ro/blogs/cristians_blog/archive/2007/11/02/forceseek-hint.aspx
May 14, 2008 at 10:01 am
The percentages are RELATIVE to the query.
88% of 2 seconds are still hell a lot better than 54% of 111 seconds.
May 14, 2008 at 9:58 am
DECLARE@Sample TABLE (Date DATETIME, ConcurrentUsers INT, Application NVARCHAR(256))
INSERT@Sample
SELECT'20080514 11:00:00', 19, 'Peso' UNION ALL
SELECT'20080514 15:15:14', 21, 'Peso' UNION ALL
SELECT'20080514 15:17:14', 11, 'Yak' UNION ALL
SELECT'20080515 15:10:10', 8, 'Peso'
SELECTApplication,
theDate,
ConcurrentUsers,
Date
FROM(
SELECTDate,
DATEADD(DAY, DATEDIFF(DAY, '19000101', Date), '19000101')...
May 14, 2008 at 8:26 am
May I cut in?
DECLARE@Sample TABLE (Date DATETIME, ConcurrentUsers INT, Application NVARCHAR(256))
INSERT@Sample
SELECT'20080514 15:15:14', 21, 'Peso' UNION ALL
SELECT'20080514 15:17:14', 11, 'Yak' UNION ALL
SELECT'20080515 15:10:10', 8, 'Peso'
SELECTDATEADD(DAY, DATEDIFF(DAY, '19000101', Date), '19000101') AS theDate,
MAX(Date)...
May 14, 2008 at 7:47 am
What was the solution in your case.
I think other users in same dilemma might benefit from the knowledge gained here.
May 14, 2008 at 6:36 am
Do you also have
1) Same edition and service pach of SQL Server
2) Same number of records in all underlying tables
3) Updated statistics
To mention a few insoection points.
May 14, 2008 at 3:30 am
SELECT... ,
(SELECTMAX(Created_Date)
FROM(
SELECT a.created_date UNION ALL
SELECT b.created_date UNION ALL
SELECT c.created_date UNION ALL
SELECT d.created_date UNION ALL
SELECT e.created_date
) AS d
) AS MaxCreatedDate
FROMTable1 AS a
INNER JOINTable2 AS b ...
INNER JOIN...
May 14, 2008 at 2:37 am
Viewing 15 posts - 916 through 930 (of 2,171 total)