[TASK] Add sql index for error counter in topbar