My Community
September 07, 2010, 03:57:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Why not have DATE as an Index field?  (Read 798 times)
Bill Dennis
Newbie
*
Posts: 31


View Profile
« on: July 24, 2008, 02:13:19 PM »

The Client online help for creating an AppGrp says that date fields should almost always be filters, not indexes.  Is this reasoning something only a DBA would understand?

Maybe because the segment table points to tables by date range already?

We use Single Table for All Loads. Is a date index OK here?

Any  comments welcome.

Thanks,
Bill
Logged
Justin Derrick
Global Moderator
Jr. Member
*****
Posts: 89


CMOD Guru, Consultant, ODUG Board Member


View Profile WWW
« Reply #1 on: July 26, 2008, 06:46:04 AM »

Hi Bill.

Indexes are best used for fields that are 'mostly unique' -- like a customer account number.

The great thing about the most recent versions of CMOD is that you can turn indexing on or off at any time.  So, while I would normally recommend indexing date fields, you can try running queries with it on or off and compare response times.  Just be forewarned that if your App Group has a lot of documents, building the index is non-trivial, and can take a considerable amount of time depending on your CPU speed and IO bandwidth.

Hope this helps!

-JD.
Logged

Call: (866) J-DERRICK   (866-533-7742)
eMail: jd@JustinDerrick.com  
Click: http://www.TenaciousConsulting.com/
leodejong
Newbie
*
Posts: 6


View Profile
« Reply #2 on: September 15, 2008, 02:27:51 AM »

Bill,

I assume you are using CMOD on z/Os. In that environment i would definitely put an index on the Date column in combination with "Single table for all loads". Software segmentation is typically a unix solution for partitioning. On z/OS i would suggest using DB2 native partitioning if the table gets too large.  Leo
Logged

Leo de Jong, Rabobank,The Netherlands
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!