#204 Index param in b2b_entities.

trunk
closed-fixed
nobody
modules (179)
5
2012-02-19
2012-02-17
Ryan Bullock
No

This adds an index on the 'param' column in the b2b_entities table for mysql. When opensips deletes from the b2b_entities table it only references the param column. Without an index this forces mysql to do a full table scan for every delete. This index should greatly speed up these queries.

Adding this index on our production system cut mysql cpu usage by more than half.

I also bumped the table version for b2b_entities and updated the db schema (hope I did this correctly).

Thanks!

Discussion

  • Ryan Bullock
    Ryan Bullock
    2012-02-17

    Index param in b2b_entities.

     
    Attachments
  • Anca Vamanu
    Anca Vamanu
    2012-02-19

    Hi Ryan,

    You are right, an index was needed for the 'param' column. I have updated the schema. Thank you for the patch.

    Regards,
    Anca

     
  • Anca Vamanu
    Anca Vamanu
    2012-02-19

    • status: open --> closed-fixed