← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 771941] Re: project_task_work needs some more indices

 

@combined index
IIRC the query must always include the columns of the index starting with the leftmost. 
or does postgres differently ?

given the  above example
     _columns = {
        'date': fields.datetime('Date', select="1"),
        'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select="1"),
        'user_id': fields.many2one('res.users', 'Done by', required=True, select="1"),

analysis use date field (this year/month/quarter) as "first" selection criteria
project uses only task_id 
time_sheet uses only user_id

the distribution may vary greatly from company to company - hence a
combined index should be customized to be most efficient.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/771941

Title:
  project_task_work needs some more indices

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  things are a bit slow without indices , it's likely to be a big table

  class project_work(osv.osv):
      
       _columns = {
          'date': fields.datetime('Date', select="1"),
          'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select="1"),
          'user_id': fields.many2one('res.users', 'Done by', required=True, select="1"),


References