Viewing 15 posts - 47,761 through 47,775 (of 49,552 total)
Looks good. The main problem now is that there's no way to tell which instructor taught which student.
Perhaps, instead of the InstructorCourse table, have a table which stored the occurences...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 11:09 pm
Pleasure.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 10:57 pm
As an aside, why are you storing dates as strings instead of datetimes?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 12:50 pm
In that case, you need an insert statement, not an update.
Insert puts new rows into a table, update modifies existing rows in the table.
Insert into dbo.MetaEvents (MetaFYStamp, MetaPerStamp, MetaDateStamp)
select cast([Fiscal...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 12:39 pm
How many rows are in MetaEvents?
Also, there's no join between MetaEvents (the table you're updating) and calender (the table that the values are coming from)
What determines which row...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 12:30 pm
Do you want the two records with the lowest dates, or all the records that have the minimum date in the table?
If the first, try top. If the second...
SELECT TheDate,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 12:20 pm
Arun T Jayapal (1/7/2008)
if (object_id('tempdb..#tblTemp','u') > 0)print 'exists'
else
print 'not exists'
...its not compiling...:ermm:
Looks fine, and runs fine for me. What's the error that you're getting?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 5:34 am
SELECT OBJECT_NAME(object_id), name FROM sys.stats
will show you all the statistics that exist in the DB
DBCC SHOW_STATISTICS ('Table name','Statistics Name')
will give you the breakdown of the stats.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 4:11 am
You should always specify column names in an insert. Otherwise if the structure of the table changes, you code breaks. Whether you explicitly state default values, or leave them out...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 1:11 am
Generally I would recommend leaving the connection settings at their default values, unless you have a good reason to change them, and you know exactly what changing them will do.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 7, 2008 at 12:50 am
Nice DB. Beter than I've seen a lot of professionals do.
Few points.
Bigints everywhere. Are you expecting more than 2.1 billion students?
The StudentCourseInstructor table looks misnamed. There's no reference to instructor...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 6, 2008 at 11:19 pm
Ziljan4 (1/6/2008)
So, can I conclude that the only way to resolve the growing log is to take T log back up which truncates...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 6, 2008 at 10:59 pm
Sergiy (1/5/2008)
Steve,index on a column used in "range" selection ("BETWEEN", ">" or/and "<", TRANS_DATE in your case) must be clustered.
Fix it and the SP will be always fast.
I don't agree...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 6, 2008 at 10:52 pm
Loner (1/6/2008)
My answer was restored the full backup from midnight, then restore the last transaction log. I guessed I was only half right?
Since they didn't say about log backups,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 6, 2008 at 10:50 pm
Or databases per customer. I've seen that before. I haven't yet had the 'pleasure' of working on monthly databases.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 5, 2008 at 10:59 am
Viewing 15 posts - 47,761 through 47,775 (of 49,552 total)