Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Date Fields & Indexes
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

grazman
Junior Member

USA
193 Posts

Posted - 09 September 2000 :  11:27:10  Show Profile  Visit grazman's Homepage
In SQL Server (and probably Access) can we convert date fields such as T_LAST_POST to either char(14) or a true datetime field? I'd also like to suggest an index on FORUM_TOPIC(FORUM_ID, T_LAST_POST).

These two really go together. This index will be used whenever all posts from a forum are displayed for a certain date range. Right now this query generates a table scan which is a "bad thing" in database terms.

This index should (and did in my forums) really speed things up. I'm actually just indexing the varchar field which is acceptable but not recommended. Converting this to a char(14) field will make a further improvement in this.

<font color=blue><b>SQLTeam.com</font id=blue></b> - For SQL Server Developers and Administrators

gor
Retired Admin

Netherlands
5511 Posts

Posted - 09 September 2000 :  16:31:25  Show Profile  Visit gor's Homepage
grazman -

We had a lot of problems with datefields in Access when users had an OS in a different language in combination with the different date settings. So, no we won't go back to there.

The field could be char(14) since the value is known and set.


<b>Pierre Gorissen </b><img src="http://www.homepages.hetnet.nl/~pgoris01/burnout.gif" border=0>
<font color=purple><font size=1>A fool learns from experience... a wise man learns from others...</font id=size1></font id=purple>
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07