shiba 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Users/ben/src/shiba/web/dist/example_data.json.no +1 -0
- data/Users/ben/src/shiba/web/dist/index.html +1 -0
- data/{web → Users/ben/src/shiba/web}/dist/js/app.4765e0d6.js +0 -0
- data/{web → Users/ben/src/shiba/web}/dist/js/app.4765e0d6.js.map +0 -0
- data/lib/shiba/version.rb +1 -1
- data/web/public/index.html +13 -0
- metadata +8 -5
- data/web/dist/index.html +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb49cd39a8eee9adba9a2d1e430c8f8d17c1534fc8a2f609a0e887191bf72cd
|
4
|
+
data.tar.gz: e40ba883aaed19427fcb056c88bd63fe3d8ca1bfd9851575ecba44e54769f546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1458a067bbebe0b2910a3fa34cf02fa7666042093ae575ceecc1f771845e17e2b41fff6d9cc760a17103d65ac03718017c827035a9acc2365a10ce671eb410ea
|
7
|
+
data.tar.gz: c173dfa72572b36275f0622641410a06d591a78f5168ddf38ea965d6f859ae250243adbad47ff21bff8c1aaa66ded23043eedb7838208dfc1f372bc30c238e3a
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"queries":[{"sql":"SELECT `settings`.`updated_at` FROM `settings` ORDER BY `settings`.`updated_at` DESC LIMIT 1","table":"settings","md5":"b46226c4acbb73c8bae67b5e596e0aca","messages":[{"tag":"access_type_tablescan","table_size":201,"table":"settings","cost":5.0249999999999995e-05,"rows_read":201,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":8,"cost":3.125e-06}],"cost":5.3374999999999996e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"22.60"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"settings","access_type":"ALL","rows_examined_per_scan":201,"rows_produced_per_join":201,"filtered":"100.00","cost_info":{"read_cost":"2.50","eval_cost":"20.10","prefix_cost":"22.60","data_read_per_join":"3M"},"used_columns":["id","updated_at"]}}}},"backtrace":["app/models/setting.rb:104:in `load'","app/models/setting.rb:55:in `get'","config/initializers/db_preferences_mysql.rb:64:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:655:in `block in load_config_initializer'"]},{"sql":"SELECT `settings`.`name`, `settings`.`state_current` FROM `settings` ORDER BY `settings`.`id` ASC","table":"settings","md5":"4336ad1f11c7ae537cdd796a9eddd066","messages":[{"tag":"access_type_index","table_size":201,"table":"settings","cost":5.0249999999999995e-05,"rows_read":201,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":201,"result_bytes":25728,"cost":0.01005}],"cost":0.01010025,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"22.60"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"settings","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":201,"rows_produced_per_join":201,"filtered":"100.00","cost_info":{"read_cost":"2.50","eval_cost":"20.10","prefix_cost":"22.60","data_read_per_join":"3M"},"used_columns":["id","name","state_current"]}}}},"backtrace":["app/models/setting.rb:108:in `load'","app/models/setting.rb:55:in `get'","config/initializers/db_preferences_mysql.rb:64:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:655:in `block in load_config_initializer'"]},{"sql":"SELECT table_name FROM information_schema.tables WHERE table_schema = database() AND table_type = 'BASE TABLE'","table":"tables","md5":"c6b8065d5e4dd9950863bab86bc4faba","messages":[{"tag":"access_type_index","table_size":null,"table":"cat","cost":2.5e-07,"rows_read":1,"index":"name","index_used":["name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"sch","join_to":"cat","cost":2.5e-07,"rows_read":1,"index":"catalog_id","index_used":["catalog_id","name"]},{"tag":"join_type_ref","table_size":null,"table":"tbl","join_to":"sch","cost":2.5e-07,"rows_read":1,"index":"schema_id","index_used":["schema_id"]},{"tag":"join_type_eq_ref","table_size":null,"table":"stat","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["schema_name","table_name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"col","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_eq_ref","table_size":null,"table":"ts","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.4999999999999998e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"76.78"},"nested_loop":[{"table":{"table_name":"cat","access_type":"index","possible_keys":["PRIMARY"],"key":"name","used_key_parts":["name"],"key_length":"194","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"224"},"used_columns":["id"]}},{"table":{"table_name":"sch","access_type":"eq_ref","possible_keys":["PRIMARY","catalog_id"],"key":"catalog_id","used_key_parts":["catalog_id","name"],"key_length":"202","ref":["mysql.cat.id","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"240"},"used_columns":["id","catalog_id","name"]}},{"table":{"table_name":"tbl","access_type":"ref","possible_keys":["schema_id","type"],"key":"schema_id","used_key_parts":["schema_id"],"key_length":"8","ref":["mysql.sch.id"],"rows_examined_per_scan":44,"rows_produced_per_join":44,"filtered":"100.00","cost_info":{"read_cost":"16.85","eval_cost":"4.43","prefix_cost":"21.98","data_read_per_join":"1M"},"used_columns":["schema_id","name","type","collation_id","hidden","tablespace_id"],"attached_condition":"((`tbl`.`type` = 'BASE TABLE') and can_access_table(`sch`.`name`,`tbl`.`name`) and is_visible_dd_object(`tbl`.`hidden`))"}},{"table":{"table_name":"stat","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["schema_name","table_name"],"key_length":"388","ref":["const","mysql.tbl.name"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"19.37","eval_cost":"4.43","prefix_cost":"45.78","data_read_per_join":"20K"},"used_columns":["schema_name","table_name"]}},{"table":{"table_name":"col","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.collation_id"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"11.07","eval_cost":"4.43","prefix_cost":"61.28","data_read_per_join":"10K"},"used_columns":["id"]}},{"table":{"table_name":"ts","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.tablespace_id"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"11.07","eval_cost":"4.43","prefix_cost":"76.78","data_read_per_join":"309K"},"used_columns":["id"]}}]}},"backtrace":["config/initializers/logo.rb:2:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:655:in `block in load_config_initializer'","gems/activesupport-5.1.6.1/lib/active_support/notifications.rb:168:in `instrument'","gems/railties-5.1.6.1/lib/rails/engine.rb:654:in `load_config_initializer'"]},{"sql":"SELECT table_name FROM information_schema.tables WHERE table_schema = database()","table":"tables","md5":"9b586e1d56e9f8992a85fe320cbadc62","messages":[{"tag":"access_type_index","table_size":null,"table":"cat","cost":2.5e-07,"rows_read":1,"index":"name","index_used":["name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"sch","join_to":"cat","cost":2.5e-07,"rows_read":1,"index":"catalog_id","index_used":["catalog_id","name"]},{"tag":"join_type_ref","table_size":null,"table":"tbl","join_to":"sch","cost":2.5e-07,"rows_read":1,"index":"schema_id","index_used":["schema_id"]},{"tag":"join_type_eq_ref","table_size":null,"table":"stat","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["schema_name","table_name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"col","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_eq_ref","table_size":null,"table":"ts","join_to":"tbl","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.4999999999999998e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"76.78"},"nested_loop":[{"table":{"table_name":"cat","access_type":"index","possible_keys":["PRIMARY"],"key":"name","used_key_parts":["name"],"key_length":"194","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"224"},"used_columns":["id"]}},{"table":{"table_name":"sch","access_type":"eq_ref","possible_keys":["PRIMARY","catalog_id"],"key":"catalog_id","used_key_parts":["catalog_id","name"],"key_length":"202","ref":["mysql.cat.id","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"240"},"used_columns":["id","catalog_id","name"]}},{"table":{"table_name":"tbl","access_type":"ref","possible_keys":["schema_id"],"key":"schema_id","used_key_parts":["schema_id"],"key_length":"8","ref":["mysql.sch.id"],"rows_examined_per_scan":44,"rows_produced_per_join":44,"filtered":"100.00","cost_info":{"read_cost":"16.85","eval_cost":"4.43","prefix_cost":"21.98","data_read_per_join":"1M"},"used_columns":["schema_id","name","collation_id","hidden","tablespace_id"],"attached_condition":"(can_access_table(`sch`.`name`,`tbl`.`name`) and is_visible_dd_object(`tbl`.`hidden`))"}},{"table":{"table_name":"stat","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["schema_name","table_name"],"key_length":"388","ref":["const","mysql.tbl.name"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"19.37","eval_cost":"4.43","prefix_cost":"45.78","data_read_per_join":"20K"},"used_columns":["schema_name","table_name"]}},{"table":{"table_name":"col","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.collation_id"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"11.07","eval_cost":"4.43","prefix_cost":"61.28","data_read_per_join":"10K"},"used_columns":["id"]}},{"table":{"table_name":"ts","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.tablespace_id"],"rows_examined_per_scan":1,"rows_produced_per_join":44,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"11.07","eval_cost":"4.43","prefix_cost":"76.78","data_read_per_join":"309K"},"used_columns":["id"]}}]}},"backtrace":["app/models/application_model/can_lookup.rb:45:in `lookup_keys'","app/models/application_model/can_lookup.rb:25:in `lookup'","app/models/store.rb:116:in `list'","lib/static_assets.rb:121:in `read'","lib/static_assets.rb:169:in `sync'","config/initializers/logo.rb:4:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'"]},{"sql":"SELECT `store_objects`.* FROM `store_objects` WHERE `store_objects`.`name` = 'System::Logo'","table":"store_objects","md5":"b19b18db406a35756f82a60b24cdc114","messages":[{"tag":"access_type_const","table":"store_objects"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/store.rb:116:in `list'","lib/static_assets.rb:121:in `read'","lib/static_assets.rb:169:in `sync'","config/initializers/logo.rb:4:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'"]},{"sql":"SELECT `stores`.* FROM `stores` WHERE `stores`.`store_object_id` IS NULL AND `stores`.`o_id` = 2 ORDER BY created_at ASC, id ASC","table":"stores","md5":"414c8f149ea8fbb7995720b1112bb1bb","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/static_assets.rb:124:in `read'","lib/static_assets.rb:169:in `sync'","config/initializers/logo.rb:4:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:655:in `block in load_config_initializer'"]},{"sql":"SELECT column_name FROM information_schema.key_column_usage WHERE constraint_name = 'PRIMARY' AND table_schema = database() AND table_name = 'type_lookups' ORDER BY ordinal_position ","table":"key_column_usage","md5":"cd3baeaf8c49d919e2dddeee0c885ab8","messages":[{"tag":"access_type_ref","table_size":null,"table":"key_column_usage","cost":2.5e-07,"rows_read":1,"index":"<auto_key0>","index_used":["CONSTRAINT_NAME","TABLE_SCHEMA","TABLE_NAME"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"3.50"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"key_column_usage","access_type":"ref","possible_keys":["<auto_key0>"],"key":"<auto_key0>","used_key_parts":["CONSTRAINT_NAME","TABLE_SCHEMA","TABLE_NAME"],"key_length":"583","ref":["const","const","const"],"rows_examined_per_scan":10,"rows_produced_per_join":10,"filtered":"100.00","cost_info":{"read_cost":"2.50","eval_cost":"1.00","prefix_cost":"3.51","data_read_per_join":"19K"},"used_columns":["CONSTRAINT_CATALOG","CONSTRAINT_SCHEMA","CONSTRAINT_NAME","TABLE_CATALOG","TABLE_SCHEMA","TABLE_NAME","COLUMN_NAME","ORDINAL_POSITION","POSITION_IN_UNIQUE_CONSTRAINT","REFERENCED_TABLE_SCHEMA","REFERENCED_TABLE_NAME","REFERENCED_COLUMN_NAME"],"attached_condition":"((`key_column_usage`.`CONSTRAINT_NAME` <=> 'PRIMARY') and (`key_column_usage`.`TABLE_SCHEMA` <=> database()) and (`key_column_usage`.`TABLE_NAME` <=> 'type_lookups'))","materialized_from_subquery":{"using_temporary_table":true,"dependent":false,"cacheable":true,"query_block":{"union_result":{"using_temporary_table":true,"table_name":"<union2,3>","access_type":"ALL","query_specifications":[{"dependent":false,"cacheable":true,"query_block":{"select_id":2,"cost_info":{"query_cost":"1887.82"},"nested_loop":[{"table":{"table_name":"cat","access_type":"index","possible_keys":["PRIMARY"],"key":"name","used_key_parts":["name"],"key_length":"194","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"224"},"used_columns":["id","name"]}},{"table":{"table_name":"tbl","access_type":"ALL","possible_keys":["PRIMARY","schema_id"],"rows_examined_per_scan":310,"rows_produced_per_join":310,"filtered":"100.00","using_join_buffer":"Block Nested Loop","cost_info":{"read_cost":"52.76","eval_cost":"31.00","prefix_cost":"84.11","data_read_per_join":"9M"},"used_columns":["id","schema_id","name","hidden"]}},{"table":{"table_name":"idx","access_type":"ref","possible_keys":["PRIMARY","table_id"],"key":"table_id","used_key_parts":["table_id"],"key_length":"8","ref":["mysql.tbl.id"],"rows_examined_per_scan":2,"rows_produced_per_join":265,"filtered":"40.00","cost_info":{"read_cost":"346.58","eval_cost":"26.52","prefix_cost":"497.00","data_read_per_join":"1M"},"used_columns":["id","table_id","name","type","hidden"],"attached_condition":"(`mysql`.`idx`.`type` in ('PRIMARY','UNIQUE'))"}},{"table":{"table_name":"sch","access_type":"eq_ref","possible_keys":["PRIMARY","catalog_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.schema_id"],"rows_examined_per_scan":1,"rows_produced_per_join":265,"filtered":"100.00","cost_info":{"read_cost":"66.30","eval_cost":"26.52","prefix_cost":"589.82","data_read_per_join":"62K"},"used_columns":["id","catalog_id","name"],"attached_condition":"(`sch`.`catalog_id` = `cat`.`id`)"}},{"table":{"table_name":"icu","access_type":"ref","possible_keys":["index_id","index_id_2","column_id"],"key":"index_id_2","used_key_parts":["index_id"],"key_length":"8","ref":["mysql.idx.id"],"rows_examined_per_scan":3,"rows_produced_per_join":1030,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"141.01","eval_cost":"103.09","prefix_cost":"833.92","data_read_per_join":"32K"},"used_columns":["index_id","ordinal_position","column_id","hidden"]}},{"table":{"table_name":"col","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.icu.column_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1030,"filtered":"100.00","cost_info":{"read_cost":"950.80","eval_cost":"103.09","prefix_cost":"1887.82","data_read_per_join":"6M"},"used_columns":["id","name","hidden"],"attached_condition":"(can_access_column(`sch`.`name`,`tbl`.`name`,`mysql`.`col`.`name`) and is_visible_dd_object(`tbl`.`hidden`,((`mysql`.`col`.`hidden` <> 'Visible') or `mysql`.`idx`.`hidden` or `mysql`.`icu`.`hidden`)))"}}]}},{"dependent":false,"cacheable":true,"query_block":{"select_id":3,"cost_info":{"query_cost":"770.67"},"nested_loop":[{"table":{"table_name":"cat","access_type":"index","possible_keys":["PRIMARY"],"key":"name","used_key_parts":["name"],"key_length":"194","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"224"},"used_columns":["id","name"]}},{"table":{"table_name":"fk","access_type":"ALL","possible_keys":["PRIMARY","schema_id","table_id"],"rows_examined_per_scan":312,"rows_produced_per_join":312,"filtered":"100.00","using_join_buffer":"Block Nested Loop","cost_info":{"read_cost":"1.00","eval_cost":"31.20","prefix_cost":"32.55","data_read_per_join":"307K"},"used_columns":["id","schema_id","table_id","name","referenced_table_schema","referenced_table_name"]}},{"table":{"table_name":"sch","access_type":"eq_ref","possible_keys":["PRIMARY","catalog_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.fk.schema_id"],"rows_examined_per_scan":1,"rows_produced_per_join":312,"filtered":"100.00","cost_info":{"read_cost":"78.00","eval_cost":"31.20","prefix_cost":"141.75","data_read_per_join":"73K"},"used_columns":["id","catalog_id","name"],"attached_condition":"(`mysql`.`sch`.`catalog_id` = `mysql`.`cat`.`id`)"}},{"table":{"table_name":"fkcu","access_type":"ref","possible_keys":["PRIMARY","foreign_key_id","column_id"],"key":"PRIMARY","used_key_parts":["foreign_key_id"],"key_length":"8","ref":["mysql.fk.id"],"rows_examined_per_scan":1,"rows_produced_per_join":312,"filtered":"100.00","cost_info":{"read_cost":"78.00","eval_cost":"31.20","prefix_cost":"250.95","data_read_per_join":"65K"},"used_columns":["foreign_key_id","ordinal_position","column_id","referenced_column_name"]}},{"table":{"table_name":"tbl","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.fk.table_id"],"rows_examined_per_scan":1,"rows_produced_per_join":312,"filtered":"100.00","cost_info":{"read_cost":"169.57","eval_cost":"31.20","prefix_cost":"451.72","data_read_per_join":"9M"},"used_columns":["id","name","hidden"]}},{"table":{"table_name":"col","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.fkcu.column_id"],"rows_examined_per_scan":1,"rows_produced_per_join":312,"filtered":"100.00","cost_info":{"read_cost":"287.75","eval_cost":"31.20","prefix_cost":"770.67","data_read_per_join":"1M"},"used_columns":["id","name","hidden"],"attached_condition":"(can_access_column(`mysql`.`sch`.`name`,`mysql`.`tbl`.`name`,`mysql`.`col`.`name`) and is_visible_dd_object(`mysql`.`tbl`.`hidden`,(`mysql`.`col`.`hidden` <> 'Visible')))"}}]}}]}}}}}}},"backtrace":["lib/models.rb:48:in `block in all'","lib/models.rb:32:in `glob'","lib/models.rb:32:in `all'","lib/models.rb:76:in `searchable'","config/initializers/models_searchable.rb:4:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'models_searchable' LIMIT 1","table":"settings","md5":"8aa86cdf06bac192f2c02ddf88367bf3","messages":[{"tag":"access_type_const","table_size":201,"table":"settings","cost":2.5e-07,"rows_read":1,"index":"index_settings_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"settings","access_type":"const","possible_keys":["index_settings_on_name"],"key":"index_settings_on_name","used_key_parts":["name"],"key_length":"602","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["config/initializers/models_searchable.rb:6:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:655:in `block in load_config_initializer'","gems/activesupport-5.1.6.1/lib/active_support/notifications.rb:168:in `instrument'","gems/railties-5.1.6.1/lib/rails/engine.rb:654:in `load_config_initializer'"]},{"sql":"SELECT `permissions`.`id` FROM `permissions`","table":"permissions","md5":"e5d66aabca18378e2c814525e9b043fc","messages":[{"tag":"access_type_index","table_size":52,"table":"permissions","cost":1.3e-05,"rows_read":52,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":52,"result_bytes":208,"cost":8.125000000000001e-05}],"cost":9.425000000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"5.45"},"table":{"table_name":"permissions","access_type":"index","key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":52,"rows_produced_per_join":52,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"5.20","prefix_cost":"5.45","data_read_per_join":"1M"},"used_columns":["id"]}}},"backtrace":["app/models/role.rb:223:in `check_default_at_signup_permissions'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `permissions`.`id` FROM `permissions` WHERE (name LIKE 'admin%' OR name = 'ticket.agent')","table":"permissions","md5":"ef19aad88b95e0e31c953d74a547234a","messages":[{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"8.03"},"table":{"table_name":"permissions","access_type":"range","possible_keys":["index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":35,"rows_produced_per_join":35,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"4.53","eval_cost":"3.50","prefix_cost":"8.03","data_read_per_join":"1M"},"used_columns":["id","name"],"attached_condition":"((`zammad_development`.`permissions`.`name` like 'admin%') or (`zammad_development`.`permissions`.`name` = 'ticket.agent'))"}}},"backtrace":["app/models/role.rb:224:in `check_default_at_signup_permissions'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `type_lookups`.* FROM `type_lookups` WHERE `type_lookups`.`name` = 'create'","table":"type_lookups","md5":"7df222321d9c5649135a46c9a12bf076","messages":[{"tag":"access_type_const","table_size":2,"table":"type_lookups","cost":2.5e-07,"rows_read":1,"index":"index_type_lookups_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"type_lookups","access_type":"const","possible_keys":["index_type_lookups_on_name"],"key":"index_type_lookups_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/type_lookup.rb:14:in `by_name'","app/models/activity_stream.rb:36:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `object_lookups`.* FROM `object_lookups` WHERE `object_lookups`.`name` = 'Role'","table":"object_lookups","md5":"bfff24173a5766296c0902af4e527095","messages":[{"tag":"access_type_const","table":"object_lookups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/object_lookup.rb:15:in `by_name'","app/models/activity_stream.rb:39:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `permissions`.* FROM `permissions` WHERE `permissions`.`name` = 'admin.role'","table":"permissions","md5":"ce2b41baace8763b18a763a7a11a2ce5","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"permissions","access_type":"const","possible_keys":["index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/activity_stream.rb:44:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'"]},{"sql":"SELECT 1 AS one FROM `roles` WHERE `roles`.`id` = 30 LIMIT 1","table":"roles","md5":"1e190bec1d05eaaae327b72cdc99e584","messages":[{"tag":"access_type_const","table":"roles"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/has_exists_check_by_object_and_id.rb:26:in `exists_by_object_and_id?'","app/models/activity_stream.rb:53:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `activity_streams`.* FROM `activity_streams` WHERE `activity_streams`.`o_id` = 30 AND `activity_streams`.`permission_id` = 4 AND `activity_streams`.`activity_stream_object_id` = 903 AND `activity_streams`.`created_by_id` = 1 ORDER BY created_at DESC, id DESC LIMIT 1","table":"activity_streams","md5":"254aca49670c5788d498bde083da76a6","messages":[{"tag":"access_type_index_merge","table_size":6,"table":"activity_streams","cost":2.5e-07,"rows_read":1,"index":"intersect(index_activity_streams_on_o_id,index_activity_streams_on_created_by_id)","index_used":null},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.77"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"0.17"},"table":{"table_name":"activity_streams","access_type":"index_merge","possible_keys":["index_activity_streams_on_o_id","index_activity_streams_on_created_by_id","index_activity_streams_on_permission_id","index_activity_streams_on_activity_stream_object_id"],"key":"intersect(index_activity_streams_on_o_id,index_activity_streams_on_created_by_id)","key_length":"4,4","rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"16.67","cost_info":{"read_cost":"0.58","eval_cost":"0.02","prefix_cost":"0.60","data_read_per_join":"8"},"used_columns":["id","activity_stream_type_id","activity_stream_object_id","permission_id","group_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`activity_streams`.`created_by_id` = 1) and (`zammad_development`.`activity_streams`.`activity_stream_object_id` = 903) and (`zammad_development`.`activity_streams`.`permission_id` = 4) and (`zammad_development`.`activity_streams`.`o_id` = 30))"}}}},"backtrace":["app/models/activity_stream.rb:62:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `permissions`.id FROM `permissions` INNER JOIN `permissions_roles` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `permissions_roles`.`role_id` = 30","table":"permissions","md5":"27f657eded3fcfb9be9c95d67c83b0f7","messages":[{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":4.125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"31K"},"used_columns":["id"]}}]}},"backtrace":["app/models/role.rb:41:in `permission_grant'","spec/controllers/integration/exchange_spec.rb:11:in `block (3 levels) in <top (required)>'","spec/controllers/integration/exchange_spec.rb:11:in `tap'","spec/controllers/integration/exchange_spec.rb:11:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `fetch'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'"]},{"sql":"SELECT `permissions`.* FROM `permissions` WHERE `permissions`.`id` = 28","table":"permissions","md5":"3254dea4189f0326673c63d97f26d67e","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"permissions","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}},"backtrace":["app/models/role.rb:43:in `permission_grant'","spec/controllers/integration/exchange_spec.rb:11:in `block (3 levels) in <top (required)>'","spec/controllers/integration/exchange_spec.rb:11:in `tap'","spec/controllers/integration/exchange_spec.rb:11:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `fetch'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'"]},{"sql":"SELECT `permissions`.* FROM `permissions` INNER JOIN `permissions_roles` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `permissions_roles`.`role_id` = 30","table":"permissions","md5":"1ac628e713f9b760d962e9ae81af07d1","messages":[{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":264,"cost":0.000103125}],"cost":0.000104125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"31K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}]}},"backtrace":["app/models/role.rb:43:in `permission_grant'","spec/controllers/integration/exchange_spec.rb:11:in `block (3 levels) in <top (required)>'","spec/controllers/integration/exchange_spec.rb:11:in `tap'","spec/controllers/integration/exchange_spec.rb:11:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `fetch'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`login` = 'nicole.braun' LIMIT 1","table":"users","md5":"18f57bda9c44d7b441c7ac477d101218","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/user.rb:999:in `check_login'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`email` = 'nicole.braun1@zammad.org' LIMIT 1","table":"users","md5":"421e22953c487f04cf80db73c9cdc898","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"index_users_on_email","index_used":["email"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_email"],"key":"index_users_on_email","used_key_parts":["email"],"key_length":"768","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1034:in `ensure_uniq_email'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`domain` = 'zammad.org' AND `organizations`.`domain_assignment` = 1 LIMIT 1","table":"organizations","md5":"c7e05f31c2122fc6e538dc5f3e180726","messages":[{"tag":"access_type_ref","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"index_organizations_on_domain","index_used":["domain"]},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"organizations","access_type":"ref","possible_keys":["index_organizations_on_domain"],"key":"index_organizations_on_domain","used_key_parts":["domain"],"key_length":"753","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`organizations`.`domain_assignment` = 1)"}}},"backtrace":["app/models/user.rb:1166:in `domain_based_assignment'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT 1 AS one FROM `users` WHERE `users`.`id` = 1748 LIMIT 1","table":"users","md5":"34efb85acdfbadc4afe722879016679a","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/has_exists_check_by_object_and_id.rb:26:in `exists_by_object_and_id?'","app/models/activity_stream.rb:53:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `history_types`.* FROM `history_types` WHERE `history_types`.`name` = 'created'","table":"history_types","md5":"79602897c707fa5d5ba614a6e71aded6","messages":[{"tag":"access_type_const","table_size":3,"table":"history_types","cost":2.5e-07,"rows_read":1,"index":"index_history_types_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_types","access_type":"const","possible_keys":["index_history_types_on_name"],"key":"index_history_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:223:in `type_lookup'","app/models/history.rb:45:in `add'","app/models/concerns/has_history.rb:147:in `history_log'","app/models/concerns/has_history.rb:23:in `history_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `history_objects`.* FROM `history_objects` WHERE `history_objects`.`name` = 'User'","table":"history_objects","md5":"c274a316367edf8a1fde3c5ad14411f3","messages":[{"tag":"access_type_const","table_size":5,"table":"history_objects","cost":2.5e-07,"rows_read":1,"index":"index_history_objects_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_objects","access_type":"const","possible_keys":["index_history_objects_on_name"],"key":"index_history_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:236:in `object_lookup'","app/models/history.rb:48:in `add'","app/models/concerns/has_history.rb:147:in `history_log'","app/models/concerns/has_history.rb:23:in `history_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`area` = 'Security::SSO'","table":"settings","md5":"83705ddfc70a905746cc1959910ca4c9","messages":[{"tag":"access_type_ref","table_size":201,"table":"settings","cost":5.0e-07,"rows_read":2,"index":"index_settings_on_area","index_used":["area"]},{"tag":"retsize","result_size":2,"result_bytes":1506,"cost":0.00058828125}],"cost":0.00058878125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"settings","access_type":"ref","possible_keys":["index_settings_on_area"],"key":"index_settings_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["lib/sso.rb:28:in `check'","app/models/user.rb:349:in `sso'","app/controllers/application_controller/authenticates.rb:58:in `authentication_check_only'","app/controllers/application_controller/authenticates.rb:28:in `authentication_check'","app/controllers/integration/exchange_controller.rb:6:in `block in <class:ExchangeController>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` = 1748 LIMIT 1","table":"users","md5":"6f9266ee068212a28acf8e33226b0cd0","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/observer/user/geo.rb:23:in `check_geo'","app/models/observer/user/geo.rb:12:in `before_update'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'"]},{"sql":"SELECT `permissions`.`preferences` FROM `permissions` INNER JOIN `permissions_roles` ON `permissions_roles`.`permission_id` = `permissions`.`id` INNER JOIN `roles` ON `roles`.`id` = `permissions_roles`.`role_id` WHERE (roles.id IN (30) AND roles.active = 1 AND permissions.name IN ('admin','admin.integration','admin.integration.exchange') AND permissions.active = 1)","table":"permissions","md5":"8991d20bec92d440faccc0b79c847d44","messages":[{"tag":"access_type_const","table":"permissions"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/user.rb:461:in `block in permissions?'","app/models/user.rb:450:in `each'","app/models/user.rb:450:in `permissions?'","app/controllers/application_controller/authenticates.rb:154:in `authentication_check_prerequesits'","app/controllers/application_controller/authenticates.rb:75:in `block in authentication_check_only'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:97:in `authenticate'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:87:in `authenticate_with_http_basic'","app/controllers/application_controller/authenticates.rb:67:in `authentication_check_only'"]},{"sql":"SELECT table_name FROM information_schema.tables WHERE table_schema = database() AND table_name = 'sessions'","table":"tables","md5":"6304e95473ec1d9918256631c7c30661","messages":[{"tag":"access_type_index","table_size":null,"table":"cat","cost":2.5e-07,"rows_read":1,"index":"name","index_used":["name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"sch","join_to":"cat","cost":2.5e-07,"rows_read":1,"index":"catalog_id","index_used":["catalog_id","name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"tbl","join_to":"sch","cost":2.5e-07,"rows_read":1,"index":"schema_id","index_used":["schema_id","name"]},{"tag":"access_type_const","table_size":null,"table":"stat","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["schema_name","table_name"]},{"tag":"join_type_eq_ref","table_size":null,"table":"col","join_to":"tbl","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_eq_ref","table_size":null,"table":"ts","join_to":"tbl","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":0,"cost":0.0}],"cost":2.0e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.58"},"nested_loop":[{"table":{"table_name":"cat","access_type":"index","possible_keys":["PRIMARY"],"key":"name","used_key_parts":["name"],"key_length":"194","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"224"},"used_columns":["id"]}},{"table":{"table_name":"sch","access_type":"eq_ref","possible_keys":["PRIMARY","catalog_id"],"key":"catalog_id","used_key_parts":["catalog_id","name"],"key_length":"202","ref":["mysql.cat.id","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"240"},"used_columns":["id","catalog_id","name"]}},{"table":{"table_name":"tbl","access_type":"eq_ref","possible_keys":["schema_id"],"key":"schema_id","used_key_parts":["schema_id","name"],"key_length":"202","ref":["mysql.sch.id","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.54","eval_cost":"0.10","prefix_cost":"1.34","data_read_per_join":"30K"},"used_columns":["schema_id","name","collation_id","hidden","tablespace_id"],"attached_condition":"(can_access_table(`sch`.`name`,`tbl`.`name`) and is_visible_dd_object(`tbl`.`hidden`))"}},{"table":{"table_name":"stat","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["schema_name","table_name"],"key_length":"388","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.44","eval_cost":"0.10","prefix_cost":"1.88","data_read_per_join":"472"},"used_columns":["schema_name","table_name"]}},{"table":{"table_name":"col","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.collation_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"2.23","data_read_per_join":"232"},"used_columns":["id"]}},{"table":{"table_name":"ts","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"8","ref":["mysql.tbl.tablespace_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"2.58","data_read_per_join":"6K"},"used_columns":["id"]}}]}},"backtrace":["app/controllers/application_controller/has_user.rb:63:in `current_user_set'","app/controllers/application_controller/authenticates.rb:158:in `authentication_check_prerequesits'","app/controllers/application_controller/authenticates.rb:75:in `block in authentication_check_only'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:97:in `authenticate'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:87:in `authenticate_with_http_basic'","app/controllers/application_controller/authenticates.rb:67:in `authentication_check_only'","app/controllers/application_controller/authenticates.rb:28:in `authentication_check'","app/controllers/integration/exchange_controller.rb:6:in `block in <class:ExchangeController>'"]},{"sql":"SELECT `sessions`.* FROM `sessions` WHERE `sessions`.`session_id` IS NULL ORDER BY `sessions`.`id` ASC LIMIT 1","table":"sessions","md5":"abc14bd6f3a16942d7206a247841dfcb","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/controllers/application_controller/has_user.rb:63:in `current_user_set'","app/controllers/application_controller/authenticates.rb:158:in `authentication_check_prerequesits'","app/controllers/application_controller/authenticates.rb:75:in `block in authentication_check_only'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:97:in `authenticate'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:87:in `authenticate_with_http_basic'","app/controllers/application_controller/authenticates.rb:67:in `authentication_check_only'","app/controllers/application_controller/authenticates.rb:28:in `authentication_check'","app/controllers/integration/exchange_controller.rb:6:in `block in <class:ExchangeController>'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`area` = 'Transaction::Backend::Sync' ORDER BY `settings`.`name` ASC","table":"settings","md5":"15341b62ab4453046ca4f6a80e032144","messages":[{"tag":"access_type_ref","table_size":201,"table":"settings","cost":5.0e-07,"rows_read":2,"index":"index_settings_on_area","index_used":["area"]},{"tag":"retsize","result_size":2,"result_bytes":1506,"cost":0.00058828125}],"cost":0.00058878125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"settings","access_type":"ref","possible_keys":["index_settings_on_area"],"key":"index_settings_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`settings`.`area` <=> 'Transaction::Backend::Sync')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}}},"backtrace":["app/models/observer/transaction.rb:34:in `perform'","app/models/observer/transaction.rb:18:in `commit'","app/controllers/application_controller/handles_transitions.rb:17:in `transaction_end'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:246:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `taskbars`.* FROM `taskbars` WHERE `taskbars`.`key` = 'Ticket-123' ORDER BY `taskbars`.`created_at` ASC, `taskbars`.`id` ASC","table":"taskbars","md5":"6741445a7eb662ce919300951a4e7c4b","messages":[{"tag":"access_type_ref","table_size":3,"table":"taskbars","cost":2.5e-07,"rows_read":1,"index":"index_taskbars_on_key","index_used":["key"]},{"tag":"retsize","result_size":1,"result_bytes":685,"cost":0.000267578125}],"cost":0.000267828125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"taskbars","access_type":"ref","possible_keys":["index_taskbars_on_key"],"key":"index_taskbars_on_key","used_key_parts":["key"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`taskbars`.`key` <=> 'Ticket-123')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"7K"},"used_columns":["id","user_id","last_contact","client_id","key","callback","state","preferences","params","prio","notify","active","created_at","updated_at"]}}}},"backtrace":["app/models/taskbar.rb:98:in `update_preferences_infos'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `calendars`.* FROM `calendars` ORDER BY `calendars`.`id` ASC LIMIT 1000","table":"calendars","md5":"f1f6611e2182728a71d19909db4fea10","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"calendars","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"calendars","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/calendar.rb:274:in `sync_default'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_update_callbacks'"]},{"sql":"SELECT `calendars`.* FROM `calendars` WHERE `calendars`.`default` = 1 LIMIT 1","table":"calendars","md5":"0a6dc4ce5c30668cfe62bae574a28878","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":10757,"cost":0.004201953125}],"cost":0.004202203125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"table":{"table_name":"calendars","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`calendars`.`default` = 1)"}}},"backtrace":["app/models/calendar.rb:286:in `min_one_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_update_callbacks'"]},{"sql":"SELECT `slas`.* FROM `slas` ORDER BY `slas`.`id` ASC LIMIT 1000","table":"slas","md5":"1c03c1b97555e928c83a366d929340b3","messages":[{"tag":"limited_scan","cost":0.0,"table":"slas","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"slas","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["id","calendar_id","name","first_response_time","update_time","solution_time","condition","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/calendar.rb:296:in `min_one_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_update_callbacks'"]},{"sql":"SELECT `email_addresses`.* FROM `email_addresses`","table":"email_addresses","md5":"f2c8a73b672a22d5ad62d7dd21383f63","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"email_addresses","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"email_addresses","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["id","channel_id","realname","email","active","note","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/email_address.rb:27:in `channel_cleanup'","app/models/channel.rb:344:in `email_address_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`id` = 2 LIMIT 1","table":"channels","md5":"2091ee08b54ab88b2ca506a9aaf2e418","messages":[{"tag":"access_type_const","table_size":2,"table":"channels","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"channels","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"6K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/email_address.rb:30:in `block in channel_cleanup'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/email_address.rb:27:in `channel_cleanup'","app/models/channel.rb:344:in `email_address_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'"]},{"sql":"SELECT DISTINCT `roles`.`id` FROM `roles` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions_roles` `roles_permissions_roles_join` ON `roles_permissions_roles_join`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `roles_permissions_roles_join`.`permission_id` WHERE (permissions_roles.permission_id IN (46,47) AND roles.active = 1 AND permissions.active = 1)","table":"roles","md5":"03b7ab9254ecf1a5c432305009c5b15d","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"roles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_ref","table_size":1000,"table":"permissions_roles","join_to":"roles","cost":1.5e-06,"rows_read":6,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_ref","table_size":null,"table":"roles_permissions_roles_join","join_to":"roles","cost":1.5e-06,"rows_read":6,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"roles_permissions_roles_join","cost":1.5e-06,"rows_read":6,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":6,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":1.4625000000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.98"},"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"nested_loop":[{"table":{"table_name":"roles","access_type":"ALL","possible_keys":["PRIMARY","index_roles_on_name","fk_rails_b41292c88f","fk_rails_e85422db7e"],"rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["zammad_development.roles.id"],"rows_examined_per_scan":4,"rows_produced_per_join":0,"filtered":"16.67","distinct":true,"cost_info":{"read_cost":"0.50","eval_cost":"0.07","prefix_cost":"1.45","data_read_per_join":"10"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` in (46,47))"}},{"table":{"table_name":"roles_permissions_roles_join","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["zammad_development.roles.id"],"rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"100.00","distinct":true,"cost_info":{"read_cost":"0.33","eval_cost":"0.27","prefix_cost":"2.05","data_read_per_join":"42"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`roles_permissions_roles_join`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_permissions_roles_join.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"10.00","distinct":true,"cost_info":{"read_cost":"0.67","eval_cost":"0.03","prefix_cost":"2.98","data_read_per_join":"8K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}}]}}},"backtrace":["app/models/user.rb:527:in `block in with_permissions'","app/models/user.rb:517:in `each'","app/models/user.rb:517:in `with_permissions'","db/migrate/20171023000001_fixed_store_upgrade_ror_45.rb:26:in `up'","gems/activerecord-5.1.6.1/lib/active_record/migration.rb:795:in `exec_migration'","gems/activerecord-5.1.6.1/lib/active_record/migration.rb:776:in `block (2 levels) in migrate'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/benchmark.rb:293:in `measure'","gems/activerecord-5.1.6.1/lib/active_record/migration.rb:775:in `block in migrate'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`active` = 1 AND `roles`.`default_at_signup` = 1","table":"roles","md5":"fdad9de27e244f480d3bf10a2593ebc6","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"roles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":408,"cost":0.000159375}],"cost":0.000160125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"roles","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`roles`.`default_at_signup` = 1) and (`zammad_development`.`roles`.`active` = 1))"}}},"backtrace":["app/models/role.rb:93:in `map'","app/models/role.rb:93:in `signup_role_ids'","app/models/user.rb:1018:in `ensure_roles'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`id` = 3","table":"roles","md5":"ff0a56537cbea60ebdea01ab0b132bf7","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1018:in `ensure_roles'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`name` = 'Agent'","table":"roles","md5":"81d9c3b949a52b3653ecbcae883cd02a","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"index_roles_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"roles","access_type":"const","possible_keys":["index_roles_on_name"],"key":"index_roles_on_name","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/user.rb:1044:in `block in validate_roles'","app/models/user.rb:1043:in `each'","app/models/user.rb:1043:in `validate_roles'","gems/activerecord-5.1.6.1/lib/active_record/associations/builder/collection_association.rb:39:in `block (2 levels) in define_callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:464:in `block in callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `each'"]},{"sql":"SELECT `roles`.id FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 1750","table":"roles","md5":"6faee9a9e851e20ede664672b4fc1c08","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id"]}}]}},"backtrace":["app/models/user.rb:1016:in `ensure_roles'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `roles`.* FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 1750","table":"roles","md5":"97cc81b987dc1d9037875edd87225c44","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":136,"cost":5.3125000000000004e-05}],"cost":5.3625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}]}},"backtrace":["app/models/user.rb:846:in `check_preferences_default'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `settings`.`name`, `settings`.`state_current` FROM `settings` WHERE (updated_at > '2019-02-25 02:30:21.190000') ORDER BY `settings`.`id` ASC","table":"settings","md5":"1a52d25d230cb17158ee1d3fc1c9dede","messages":[{"tag":"access_type_index","table_size":201,"table":"settings","cost":5.0249999999999995e-05,"rows_read":201,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":201,"result_bytes":25728,"cost":0.01005}],"cost":0.01010025,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"22.60"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"settings","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":201,"rows_produced_per_join":66,"filtered":"33.33","cost_info":{"read_cost":"15.90","eval_cost":"6.70","prefix_cost":"22.60","data_read_per_join":"1M"},"used_columns":["id","name","state_current","updated_at"],"attached_condition":"(`zammad_development`.`settings`.`updated_at` > '2019-02-25 02:30:21.190000')"}}}},"backtrace":["app/models/setting.rb:106:in `load'","app/models/setting.rb:55:in `get'","lib/import/integration_base.rb:62:in `config'","gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb:99:in `call'","gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb:99:in `block in and_call_original'","gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb:730:in `call'","gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'","gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'"]},{"sql":"SELECT `recent_views`.* FROM `recent_views` WHERE `recent_views`.`recent_view_object_id` = 905 AND `recent_views`.`o_id` = 331","table":"recent_views","md5":"61663ca8d7d7e28309fcd73e272f49e2","messages":[{"tag":"access_type_index_merge","table_size":3,"table":"recent_views","cost":2.5e-07,"rows_read":1,"index":"intersect(index_recent_views_on_o_id,index_recent_views_on_recent_view_object_id)","index_used":null},{"tag":"retsize","result_size":1,"result_bytes":32,"cost":1.25e-05}],"cost":1.275e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"table":{"table_name":"recent_views","access_type":"index_merge","possible_keys":["index_recent_views_on_o_id","index_recent_views_on_recent_view_object_id"],"key":"intersect(index_recent_views_on_o_id,index_recent_views_on_recent_view_object_id)","key_length":"4,4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"32"},"used_columns":["id","recent_view_object_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`recent_views`.`o_id` = 331) and (`zammad_development`.`recent_views`.`recent_view_object_id` = 905))"}}},"backtrace":["app/models/recent_view.rb:30:in `log_destroy'","app/models/application_model/has_recent_views.rb:19:in `recent_view_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `external_syncs`.* FROM `external_syncs` WHERE `external_syncs`.`object` = 'OnlineNotification' AND `external_syncs`.`o_id` = 331","table":"external_syncs","md5":"4648d0356bfcddcb04d275d9e3bd62c0","messages":[{"tag":"access_type_ref","table_size":0,"table":"external_syncs","cost":2.5e-07,"rows_read":1,"index":"index_external_syncs_on_object_and_o_id","index_used":["object","o_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"external_syncs","access_type":"ref","possible_keys":["index_external_syncs_on_object_and_o_id"],"key":"index_external_syncs_on_object_and_o_id","used_key_parts":["object","o_id"],"key_length":"306","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","source","source_id","object","o_id","last_payload","created_at","updated_at"]}}},"backtrace":["app/models/application_model/has_external_sync.rb:13:in `external_sync_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_destroy_callbacks'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'application_secret'","table":"settings","md5":"8edfb3542191244ed28d23af573d08c2","messages":[{"tag":"access_type_const","table_size":201,"table":"settings","cost":2.5e-07,"rows_read":1,"index":"index_settings_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"settings","access_type":"const","possible_keys":["index_settings_on_name"],"key":"index_settings_on_name","used_key_parts":["name"],"key_length":"602","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/settings.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE 1=0","table":"roles","md5":"2c3bd94bbedee5bf72234f84e229279c","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/user.rb:1018:in `ensure_roles'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `signatures`.* FROM `signatures` WHERE `signatures`.`id` = 1 LIMIT 1","table":"signatures","md5":"fe29b27276bc6d13d1fccba13956327b","messages":[{"tag":"access_type_const","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"signatures","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","body","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/signatures.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`id` = 1 LIMIT 1","table":"roles","md5":"e70ec7690669f488a2de5e5b6c60dae5","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/roles.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `permissions`.* FROM `permissions` WHERE `permissions`.`id` IN (35, 1)","table":"permissions","md5":"3f617412cf1fe550ffef81bb29930b77","messages":[{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":132,"cost":5.15625e-05}],"cost":5.18125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"table":{"table_name":"permissions","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"63K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"],"attached_condition":"(`zammad_development`.`permissions`.`id` in (35,1))"}}},"backtrace":["app/models/role.rb:43:in `permission_grant'","db/seeds/permissions.rb:369:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`id` = 1 LIMIT 1","table":"groups","md5":"c96545276252c7a90757bcb1d98170d8","messages":[{"tag":"access_type_const","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"groups","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/groups.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `link_types`.* FROM `link_types` WHERE `link_types`.`id` = 1 LIMIT 1","table":"link_types","md5":"7237bf73156af39e63abdae6c0859c30","messages":[{"tag":"access_type_const","table_size":1,"table":"link_types","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"link_types","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","active","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/links.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `link_objects`.* FROM `link_objects` WHERE `link_objects`.`id` = 1 LIMIT 1","table":"link_objects","md5":"536c85bcb9526fb00c604c5fb8c34872","messages":[{"tag":"access_type_const","table_size":5,"table":"link_objects","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"link_objects","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","active","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/links.rb:2:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `ticket_state_types`.* FROM `ticket_state_types` WHERE `ticket_state_types`.`id` = 1 LIMIT 1","table":"ticket_state_types","md5":"a9ce6b7f22e484e9df93b77e145145c4","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_state_types","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/ticket_state_types.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`id` = 1 LIMIT 1","table":"ticket_states","md5":"9a0f622402351de6ed099f940b1992a8","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_states","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/ticket_states.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT COUNT(*) FROM `ticket_states` WHERE `ticket_states`.`default_create` = 1","table":"ticket_states","md5":"e3e2e385052726dd44a4312a482d37eb","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":7.5e-07,"rows_read":3,"index":"index_ticket_states_on_default_create","index_used":["default_create"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["index_ticket_states_on_default_create"],"key":"index_ticket_states_on_default_create","used_key_parts":["default_create"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["default_create"]}}},"backtrace":["app/models/ticket/state.rb:92:in `block in ensure_defaults'","app/models/ticket/state.rb:90:in `each'","app/models/ticket/state.rb:90:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT COUNT(*) FROM `ticket_states` WHERE `ticket_states`.`default_follow_up` = 1","table":"ticket_states","md5":"347d525c620b50a96c561f3c27a9966a","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":7.5e-07,"rows_read":3,"index":"index_ticket_states_on_default_follow_up","index_used":["default_follow_up"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["index_ticket_states_on_default_follow_up"],"key":"index_ticket_states_on_default_follow_up","used_key_parts":["default_follow_up"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["default_follow_up"]}}},"backtrace":["app/models/ticket/state.rb:92:in `block in ensure_defaults'","app/models/ticket/state.rb:90:in `each'","app/models/ticket/state.rb:90:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`active` = 1 ORDER BY `ticket_states`.`id` ASC LIMIT 1","table":"ticket_states","md5":"c136392a3e84e3ae8c42011d8349ad3e","messages":[{"tag":"access_type_index","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":47,"cost":1.8359375e-05}],"cost":2.0109375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.95"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"ticket_states","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"14.29","cost_info":{"read_cost":"0.85","eval_cost":"0.10","prefix_cost":"0.95","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`ticket_states`.`active` = 1)"}}}},"backtrace":["app/models/ticket/state.rb:95:in `block in ensure_defaults'","app/models/ticket/state.rb:90:in `each'","app/models/ticket/state.rb:90:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states`","table":"ticket_states","md5":"db2291e776070431523945ed9f50e8ea","messages":[{"tag":"access_type_tablescan","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":null,"index_used":null},{"tag":"retsize","result_size":7,"result_bytes":329,"cost":0.000128515625}],"cost":0.00013026562499999998,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.95"},"table":{"table_name":"ticket_states","access_type":"ALL","rows_examined_per_scan":7,"rows_produced_per_join":7,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.70","prefix_cost":"0.95","data_read_per_join":"10K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket/state.rb:102:in `block in ensure_defaults'","app/models/ticket/state.rb:90:in `each'","app/models/ticket/state.rb:90:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`id` = 1 LIMIT 1","table":"ticket_priorities","md5":"d8fd0c50646141aa80d27526f1ccadb5","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_priorities","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_priorities","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/ticket_priorities.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT COUNT(*) FROM `ticket_priorities` WHERE `ticket_priorities`.`default_create` = 1","table":"ticket_priorities","md5":"70318f1483004a8637303fbad50d1feb","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_priorities","cost":2.5e-07,"rows_read":1,"index":"index_ticket_priorities_on_default_create","index_used":["default_create"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_priorities","access_type":"ref","possible_keys":["index_ticket_priorities_on_default_create"],"key":"index_ticket_priorities_on_default_create","used_key_parts":["default_create"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["default_create"]}}},"backtrace":["app/models/ticket/priority.rb:17:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`active` = 1 ORDER BY `ticket_priorities`.`id` ASC LIMIT 1","table":"ticket_priorities","md5":"9ebef67a6916f9a3776f62458ccbf535","messages":[{"tag":"access_type_index","table_size":3,"table":"ticket_priorities","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.4812500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"ticket_priorities","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"1K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`ticket_priorities`.`active` = 1)"}}}},"backtrace":["app/models/ticket/priority.rb:20:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities`","table":"ticket_priorities","md5":"7ba87f2615cef9544286656b560b0bb2","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_priorities","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":108,"cost":4.21875e-05}],"cost":4.29375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"ticket_priorities","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"4K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket/priority.rb:28:in `ensure_defaults'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT `ticket_article_types`.* FROM `ticket_article_types` WHERE `ticket_article_types`.`id` = 1 LIMIT 1","table":"ticket_article_types","md5":"7cab62e37790134203c77813810c8b36","messages":[{"tag":"access_type_const","table_size":12,"table":"ticket_article_types","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_types","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","communication","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/ticket_article_types.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `ticket_article_senders`.* FROM `ticket_article_senders` WHERE `ticket_article_senders`.`id` = 1 LIMIT 1","table":"ticket_article_senders","md5":"654950c3e0bbebae2024e3b56a39904e","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_article_senders","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_senders","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/ticket_article_senders.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `macros`.* FROM `macros` WHERE `macros`.`name` = 'Close & Tag as Spam'","table":"macros","md5":"7a703c8567dce099101a258405e8168b","messages":[{"tag":"access_type_const","table_size":1,"table":"macros","cost":2.5e-07,"rows_read":1,"index":"index_macros_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"macros","access_type":"const","possible_keys":["index_macros_on_name"],"key":"index_macros_on_name","used_key_parts":["name"],"key_length":"753","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","name","perform","active","ux_flow_next_up","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/macros.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`id` = 1 LIMIT 1","table":"organizations","md5":"4925cfc45e0d2a998b6b07e35e42101d","messages":[{"tag":"access_type_const","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"organizations","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:22:in `create_if_not_exists'","db/seeds/community_user_resources.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT COUNT(*) FROM `users` WHERE `users`.`organization_id` = 1","table":"users","md5":"ff2815fc6d909cecc46d071d36fc5c97","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.0062499999999999995,"rows_read":25000,"index":"index_users_on_organization_id","index_used":["organization_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.0062499999999999995,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_organization_id"],"key":"index_users_on_organization_id","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["organization_id"]}}},"backtrace":["app/models/observer/organization/ref_object_touch.rb:24:in `ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:7:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` WHERE `tickets`.`organization_id` = 1","table":"tickets","md5":"fb8a67e1543e052238e5205163d19ce9","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"fk_rails_b62b455ecb","index_used":["organization_id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"39375.64"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["fk_rails_b62b455ecb"],"key":"fk_rails_b62b455ecb","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"422.44","eval_cost":"38953.20","prefix_cost":"39375.64","data_read_per_join":"802M"},"used_columns":["id","organization_id"]}}},"backtrace":["app/models/observer/organization/ref_object_touch.rb:27:in `ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:7:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `users`.`id` FROM `users` WHERE `users`.`organization_id` = 1","table":"users","md5":"57a95885c27a32b633b4bdb98690755f","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.0062499999999999995,"rows_read":25000,"index":"index_users_on_organization_id","index_used":["organization_id"]},{"tag":"retsize","result_size":25000,"result_bytes":100000,"cost":0.0390625}],"cost":0.0453125,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_organization_id"],"key":"index_users_on_organization_id","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id"]}}},"backtrace":["app/models/observer/organization/ref_object_touch.rb:35:in `ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:7:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT COUNT(*) FROM `avatars` WHERE `avatars`.`object_lookup_id` = 1 AND `avatars`.`o_id` = 2","table":"avatars","md5":"5a9bf46c6c817d8330d2728348cec555","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":2.5e-07,"rows_read":1,"index":"index_avatars_on_o_id_and_object_lookup_id","index_used":["o_id","object_lookup_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"avatars","access_type":"ref","possible_keys":["index_avatars_on_o_id_and_object_lookup_id"],"key":"index_avatars_on_o_id_and_object_lookup_id","used_key_parts":["o_id","object_lookup_id"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["o_id","object_lookup_id"]}}},"backtrace":["app/models/avatar.rb:405:in `_add_init_avatar'","app/models/avatar.rb:82:in `add'","app/models/avatar.rb:26:in `auto_detection'","app/models/user.rb:1197:in `avatar_for_email_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `object_lookups`.* FROM `object_lookups` WHERE `object_lookups`.`id` = 1 LIMIT 1","table":"object_lookups","md5":"77c63b886fdc55d724b9266470096453","messages":[{"tag":"access_type_const","table_size":7,"table":"object_lookups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"object_lookups","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/object_lookup.rb:7:in `by_id'","app/models/avatar.rb:408:in `_add_init_avatar'","app/models/avatar.rb:82:in `add'","app/models/avatar.rb:26:in `auto_detection'","app/models/user.rb:1197:in `avatar_for_email_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'"]},{"sql":"SELECT `avatars`.* FROM `avatars` WHERE `avatars`.`object_lookup_id` = 1 AND `avatars`.`o_id` = 2 AND `avatars`.`source` = 'zammad.com' LIMIT 1","table":"avatars","md5":"e05873f4ce5e71f617df23da615da160","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":2.5e-07,"rows_read":1,"index":"index_avatars_on_o_id_and_object_lookup_id","index_used":["o_id","object_lookup_id"]},{"tag":"retsize","result_size":1,"result_bytes":97,"cost":3.7890625e-05}],"cost":3.8140625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"avatars","access_type":"ref","possible_keys":["index_avatars_on_o_id_and_object_lookup_id","index_avatars_on_source"],"key":"index_avatars_on_o_id_and_object_lookup_id","used_key_parts":["o_id","object_lookup_id"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"496"},"used_columns":["id","o_id","object_lookup_id","default","deletable","initial","store_full_id","store_resize_id","store_hash","source","source_url","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`avatars`.`source` = 'zammad.com')"}}},"backtrace":["app/models/avatar.rb:99:in `add'","app/models/avatar.rb:26:in `auto_detection'","app/models/user.rb:1197:in `avatar_for_email_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `users`.id FROM `users` WHERE `users`.`organization_id` = 1","table":"users","md5":"9fa448b3c2478b3e6ecf380ff21968d4","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.0062499999999999995,"rows_read":25000,"index":"index_users_on_organization_id","index_used":["organization_id"]},{"tag":"retsize","result_size":25000,"result_bytes":100000,"cost":0.0390625}],"cost":0.0453125,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_organization_id"],"key":"index_users_on_organization_id","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id"]}}},"backtrace":["app/models/observer/user/ref_object_touch.rb:44:in `ref_object_touch'","app/models/observer/user/ref_object_touch.rb:7:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`customer_id` = 2 LIMIT 100","table":"tickets","md5":"f428da900a0ee3c6267b03fb1c049a52","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.251562500000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"56924.78"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","cost_info":{"read_cost":"17971.58","eval_cost":"38953.20","prefix_cost":"56924.78","data_read_per_join":"802M"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/observer/user/ticket_organization.rb:22:in `check_organization'","app/models/observer/user/ticket_organization.rb:7:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `ticket_counters`.* FROM `ticket_counters` WHERE `ticket_counters`.`generator` = 'Increment' ORDER BY `ticket_counters`.`id` ASC LIMIT 1 FOR UPDATE","table":"ticket_counters","md5":"0e9cd04d041d93e4cdc01b3bfbe5ef58","messages":[{"tag":"access_type_const","table_size":1,"table":"ticket_counters","cost":2.5e-07,"rows_read":1,"index":"index_ticket_counters_on_generator","index_used":["generator"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"ticket_counters","access_type":"const","possible_keys":["index_ticket_counters_on_generator"],"key":"index_ticket_counters_on_generator","used_key_parts":["generator"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"616"},"used_columns":["id","content","generator"]}}}},"backtrace":["app/models/ticket/number/increment.rb:15:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket/number/increment.rb:14:in `generate'","app/models/ticket/number.rb:22:in `block in generate'","app/models/ticket/number.rb:21:in `times'","app/models/ticket/number.rb:21:in `generate'","app/models/ticket.rb:1206:in `check_generate'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`number` = '25001' LIMIT 1","table":"tickets","md5":"3ed9842b1c03987e5e78d26bf2567fe5","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket/number.rb:23:in `block in generate'","app/models/ticket/number.rb:21:in `times'","app/models/ticket/number.rb:21:in `generate'","app/models/ticket.rb:1206:in `check_generate'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`default_create` = 1 LIMIT 1","table":"ticket_states","md5":"e3096f2eb102b2ab759bca3935212895","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":7.5e-07,"rows_read":3,"index":"index_ticket_states_on_default_create","index_used":["default_create"]},{"tag":"retsize","result_size":1,"result_bytes":47,"cost":1.8359375e-05}],"cost":1.9109375000000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["index_ticket_states_on_default_create"],"key":"index_ticket_states_on_default_create","used_key_parts":["default_create"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1254:in `set_default_state'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`default_create` = 1 LIMIT 1","table":"ticket_priorities","md5":"49d01aeb729bbc2bad16c8d0d6eabd55","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_priorities","cost":2.5e-07,"rows_read":1,"index":"index_ticket_priorities_on_default_create","index_used":["default_create"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_priorities","access_type":"ref","possible_keys":["index_ticket_priorities_on_default_create"],"key":"index_ticket_priorities_on_default_create","used_key_parts":["default_create"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1264:in `set_default_priority'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`id` = 1 LIMIT 1","table":"tickets","md5":"a11cf0699f47f600d268776e12e4d1b6","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","lib/stats/ticket_reopen.rb:69:in `log'","app/models/observer/ticket/stats_reopen.rb:24:in `_check'","app/models/observer/ticket/stats_reopen.rb:10:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'"]},{"sql":"SELECT 1 AS one FROM `tickets` WHERE `tickets`.`id` = 1 LIMIT 1","table":"tickets","md5":"774ecd25d248e28e4f751e11864b1bff","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"tickets","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id"]}}},"backtrace":["app/models/observer/ticket/escalation_update.rb:17:in `_check'","app/models/observer/ticket/escalation_update.rb:7:in `after_commit'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `slas`.* FROM `slas` ORDER BY `slas`.`name` ASC, `slas`.`created_at` ASC","table":"slas","md5":"8092ead0330f7b9099032c303a13ed94","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"slas","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"slas","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["id","calendar_id","name","first_response_time","update_time","solution_time","condition","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/ticket/escalation.rb:303:in `escalation_calculation_get_sla'","app/models/ticket/escalation.rb:77:in `escalation_calculation_int'","app/models/ticket/escalation.rb:41:in `escalation_calculation'","app/models/observer/ticket/escalation_update.rb:20:in `_check'","app/models/observer/ticket/escalation_update.rb:7:in `after_commit'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'"]},{"sql":"SELECT `ticket_article_senders`.* FROM `ticket_article_senders` WHERE `ticket_article_senders`.`name` = 'Customer'","table":"ticket_article_senders","md5":"eb8c4ef15a32848400f70bca3a53fc62","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_article_senders","cost":2.5e-07,"rows_read":1,"index":"index_ticket_article_senders_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_senders","access_type":"const","possible_keys":["index_ticket_article_senders_on_name"],"key":"index_ticket_article_senders_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/observer/ticket/article/fillup_from_general.rb:37:in `before_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 1 AND (sender_id NOT IN (3))","table":"ticket_articles","md5":"69c85e6b560e313d885ae3601abd899a","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id","index_ticket_articles_on_sender_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["ticket_id","sender_id"],"attached_condition":"(`zammad_development`.`ticket_articles`.`sender_id` <> 3)"}}},"backtrace":["app/models/observer/ticket/article_changes.rb:51:in `article_count_update'","app/models/observer/ticket/article_changes.rb:9:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 1","table":"ticket_articles","md5":"fedacef4cc108889a9ede102c8b10f4a","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["ticket_id"]}}},"backtrace":["app/models/observer/ticket/article_changes.rb:88:in `sender_type_update'","app/models/observer/ticket/article_changes.rb:17:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `history_attributes`.* FROM `history_attributes` WHERE `history_attributes`.`name` = 'last_contact_customer_at'","table":"history_attributes","md5":"405e3867547589c4c933a594b1003cfa","messages":[{"tag":"access_type_const","table_size":3,"table":"history_attributes","cost":2.5e-07,"rows_read":1,"index":"index_history_attributes_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_attributes","access_type":"const","possible_keys":["index_history_attributes_on_name"],"key":"index_history_attributes_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:249:in `attribute_lookup'","app/models/history.rb:57:in `add'","app/models/concerns/has_history.rb:147:in `history_log'","app/models/concerns/has_history.rb:104:in `block in history_update'","app/models/concerns/has_history.rb:56:in `each'","app/models/concerns/has_history.rb:56:in `history_update'"]},{"sql":"SELECT `overviews`.* FROM `overviews` WHERE `overviews`.`name` = 'My assigned Tickets'","table":"overviews","md5":"d662851598182321608f74d4f89c2f98","messages":[{"tag":"access_type_ref","table_size":9,"table":"overviews","cost":2.5e-07,"rows_read":1,"index":"index_overviews_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":665,"cost":0.000259765625}],"cost":0.000260015625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"overviews","access_type":"ref","possible_keys":["index_overviews_on_name"],"key":"index_overviews_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"13K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/overviews.rb:2:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (1,2,7,3) AND `tickets`.`owner_id` IN (1) AND `tickets`.`id` IN (1))","table":"tickets","md5":"94e61a6bddcaade798244c738d15a898","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `overviews`.* FROM `overviews` WHERE `overviews`.`link` = 'my_assigned' LIMIT 1","table":"overviews","md5":"1e52271f2fa2dbb63699db308930e656","messages":[{"tag":"access_type_tablescan","table_size":9,"table":"overviews","cost":2.25e-06,"rows_read":9,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":665,"cost":0.000259765625}],"cost":0.000262015625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.15"},"table":{"table_name":"overviews","access_type":"ALL","rows_examined_per_scan":9,"rows_produced_per_join":1,"filtered":"11.11","cost_info":{"read_cost":"1.05","eval_cost":"0.10","prefix_cost":"1.15","data_read_per_join":"13K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`overviews`.`link` = 'my_assigned')"}}},"backtrace":["app/models/overview.rb:104:in `link_name'","app/models/overview.rb:72:in `fill_link_on_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (1,2,3) AND (`tickets`.`owner_id` IS NULL OR `tickets`.`owner_id` IN (1)) AND `tickets`.`id` IN (1))","table":"tickets","md5":"763387d67b31020fb8fd59fc04686fe7","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (3) AND `tickets`.`owner_id` IN (1) AND `tickets`.`pending_time` <= '2019-02-25 16:01:04.852209' AND `tickets`.`id` IN (1))","table":"tickets","md5":"5bd942673a5aba06d21d2cd1da269434","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (1,2,3) AND `tickets`.`id` IN (1))","table":"tickets","md5":"1f9e04742e8a91d92cf6d4fa53a93ca2","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (3) AND `tickets`.`pending_time` <= '2019-02-25 16:01:04.947802' AND `tickets`.`id` IN (1))","table":"tickets","md5":"a0ac7e6f0cc0c20866949600e34aa96a","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`escalation_at` <= '2019-02-25 16:11:04.992730' AND `tickets`.`id` IN (1))","table":"tickets","md5":"ba65065452f5a8bdfc7b09ed62f664e4","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `users`.`id` FROM `users` WHERE `users`.`active` = 1 AND `users`.`out_of_office` = 1 AND `users`.`out_of_office_replacement_id` = 1 AND (out_of_office_start_at <= '2019-02-25' AND out_of_office_end_at >= '2019-02-25')","table":"users","md5":"69eb66c612893cb84841d38f2ada62a3","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"index_users_on_out_of_office_replacement_id","index_used":["out_of_office_replacement_id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_out_of_office","index_users_on_out_of_office_replacement_id"],"key":"index_users_on_out_of_office_replacement_id","used_key_parts":["out_of_office_replacement_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"11K"},"used_columns":["id","active","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id"],"attached_condition":"((`zammad_development`.`users`.`out_of_office` = 1) and (`zammad_development`.`users`.`active` = 1) and (`zammad_development`.`users`.`out_of_office_start_at` <= '2019-02-25') and (`zammad_development`.`users`.`out_of_office_end_at` >= '2019-02-25'))"}}},"backtrace":["app/models/ticket.rb:604:in `block in selector2sql'","app/models/ticket.rb:552:in `each'","app/models/ticket.rb:552:in `selector2sql'","app/models/ticket.rb:433:in `selectors'","app/models/concerns/checks_condition_validation.rb:29:in `validate_condition'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (1,2,3,7,4,6) AND `tickets`.`customer_id` IN (1) AND `tickets`.`id` IN (1))","table":"tickets","md5":"8d0064006cf8fa62dcd0aa171e48bcc1","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`state_id` IN (1,2,3,7,4,6) AND `tickets`.`organization_id` IN (NULL) AND `tickets`.`id` IN (1))","table":"tickets","md5":"551754ae974c548b7ff5bbf107e386a5","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `report_profiles`.* FROM `report_profiles` WHERE `report_profiles`.`name` = '-all-'","table":"report_profiles","md5":"64bc14daaa6ea2639cd9d0b343f33220","messages":[{"tag":"access_type_const","table_size":1,"table":"report_profiles","cost":2.5e-07,"rows_read":1,"index":"index_report_profiles_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"report_profiles","access_type":"const","possible_keys":["index_report_profiles_on_name"],"key":"index_report_profiles_on_name","used_key_parts":["name"],"key_length":"453","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"496"},"used_columns":["id","name","condition","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/report_profiles.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `chats`.* FROM `chats` WHERE `chats`.`name` = 'default'","table":"chats","md5":"b954ed1b2c53b7d6688db155502addb1","messages":[{"tag":"access_type_const","table_size":1,"table":"chats","cost":2.5e-07,"rows_read":1,"index":"index_chats_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"chats","access_type":"const","possible_keys":["index_chats_on_name"],"key":"index_chats_on_name","used_key_parts":["name"],"key_length":"753","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"45K"},"used_columns":["id","name","max_queue","note","active","public","block_ip","block_country","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/chats.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` WHERE `object_manager_attributes`.`object_lookup_id` = 2 AND `object_manager_attributes`.`name` = 'title' LIMIT 1","table":"object_manager_attributes","md5":"6aa52f10ed67c5a78914fba37245f8d9","messages":[{"tag":"access_type_const","table_size":48,"table":"object_manager_attributes","cost":2.5e-07,"rows_read":1,"index":"index_object_manager_attributes_on_object_lookup_id_and_name","index_used":["object_lookup_id","name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"object_manager_attributes","access_type":"const","possible_keys":["index_object_manager_attributes_on_object_lookup_id_and_name","index_object_manager_attributes_on_object_lookup_id"],"key":"index_object_manager_attributes_on_object_lookup_id_and_name","used_key_parts":["object_lookup_id","name"],"key_length":"606","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"7K"},"used_columns":["id","object_lookup_id","name","display","data_type","data_option","data_option_new","editable","active","screens","to_create","to_migrate","to_delete","to_config","position","created_by_id","updated_by_id","created_at","updated_at"]}}},"backtrace":["app/models/object_manager/attribute.rb:303:in `add'","db/seeds/object_manager_attributes.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `ticket_article_types`.* FROM `ticket_article_types` WHERE `ticket_article_types`.`name` = 'note'","table":"ticket_article_types","md5":"16b9d6fd4a201d3ac5942236834b1a67","messages":[{"tag":"access_type_const","table_size":12,"table":"ticket_article_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_article_types_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_types","access_type":"const","possible_keys":["index_ticket_article_types_on_name"],"key":"index_ticket_article_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","communication","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","db/seeds/object_manager_attributes.rb:336:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'"]},{"sql":"SELECT `schedulers`.* FROM `schedulers` WHERE `schedulers`.`name` = 'Process pending tickets'","table":"schedulers","md5":"84cf0b0f56a19f33d6e8e3b12ca73fa4","messages":[{"tag":"access_type_const","table_size":21,"table":"schedulers","cost":2.5e-07,"rows_read":1,"index":"index_schedulers_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"schedulers","access_type":"const","possible_keys":["index_schedulers_on_name"],"key":"index_schedulers_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"4K"},"used_columns":["id","name","method","period","running","last_run","prio","pid","note","error_message","status","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds/schedulers.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `triggers`.* FROM `triggers` WHERE `triggers`.`name` = 'auto reply (on new tickets)'","table":"triggers","md5":"9669360526edd7b83724134b2a9ac864","messages":[{"tag":"access_type_const","table_size":3,"table":"triggers","cost":2.5e-07,"rows_read":1,"index":"index_triggers_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"triggers","access_type":"const","possible_keys":["index_triggers_on_name"],"key":"index_triggers_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","condition","perform","disable_notification","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:136:in `create_or_update'","db/seeds/triggers.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.customer_id = 1) AND (tickets.id = articles.ticket_id AND (`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `articles`.`type_id` IN (1,5,11) AND `articles`.`sender_id` IN (2) AND `tickets`.`id` IN (1))","table":"tickets","md5":"874fe1ee68d1c88b75fd35bd0f023e2e","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.customer_id = 1) AND (tickets.id = articles.ticket_id AND `articles`.`sender_id` IN (2) AND `articles`.`type_id` IN (1,5,11) AND `tickets`.`id` IN (1))","table":"tickets","md5":"d6a274d23852ec8058388d550ffb037d","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`id` IN (1))","table":"tickets","md5":"312bc9251fb0c88f8fe146d61048322f","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `karma_activities`.* FROM `karma_activities` WHERE `karma_activities`.`name` = 'ticket create'","table":"karma_activities","md5":"ffede14358e35152d58900fc01d361fb","messages":[{"tag":"access_type_const","table_size":11,"table":"karma_activities","cost":2.5e-07,"rows_read":1,"index":"index_karma_activities_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"karma_activities","access_type":"const","possible_keys":["index_karma_activities_on_name"],"key":"index_karma_activities_on_name","used_key_parts":["name"],"key_length":"602","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","description","score","once_ttl","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:136:in `create_or_update'","db/seeds/karma_activities.rb:1:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","db/seeds.rb:21:in `block in <top (required)>'","db/seeds.rb:19:in `each'"]},{"sql":"SELECT `locales`.* FROM `locales` WHERE `locales`.`name` = 'English (United States)'","table":"locales","md5":"3e75989b4fa3025f95269284470fcd42","messages":[{"tag":"access_type_const","table_size":38,"table":"locales","cost":2.5e-07,"rows_read":1,"index":"index_locales_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"locales","access_type":"const","possible_keys":["index_locales_on_name"],"key":"index_locales_on_name","used_key_parts":["name"],"key_length":"767","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"936"},"used_columns":["id","locale","alias","name","dir","active","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:32:in `create_if_not_exists'","db/seeds.rb:28:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:549:in `load_seed'","gems/activerecord-5.1.6.1/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'"]},{"sql":"SELECT `locales`.* FROM `locales` WHERE `locales`.`locale` = 'bg' LIMIT 1","table":"locales","md5":"e4ce98369c2134420dbdb94e6a252870","messages":[{"tag":"access_type_const","table_size":38,"table":"locales","cost":2.5e-07,"rows_read":1,"index":"index_locales_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"locales","access_type":"const","possible_keys":["index_locales_on_locale"],"key":"index_locales_on_locale","used_key_parts":["locale"],"key_length":"62","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"936"},"used_columns":["id","locale","alias","name","dir","active","created_at","updated_at"]}}},"backtrace":["app/models/locale.rb:122:in `block (2 levels) in to_database'","app/models/locale.rb:121:in `each'","app/models/locale.rb:121:in `block in to_database'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `locales`.* FROM `locales` WHERE `locales`.`active` = 1 AND `locales`.`locale` IN ('en-us', 'de-de')","table":"locales","md5":"55c97519769a998ab0e2af7613aa6478","messages":[{"tag":"access_type_range","table_size":38,"table":"locales","cost":2.5e-07,"rows_read":1,"index":"index_locales_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1,"result_bytes":42,"cost":1.6406250000000002e-05}],"cost":1.665625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.41"},"table":{"table_name":"locales","access_type":"range","possible_keys":["index_locales_on_locale"],"key":"index_locales_on_locale","used_key_parts":["locale"],"key_length":"62","rows_examined_per_scan":2,"rows_produced_per_join":0,"filtered":"10.00","index_condition":"(`zammad_development`.`locales`.`locale` in ('en-us','de-de'))","cost_info":{"read_cost":"1.39","eval_cost":"0.02","prefix_cost":"1.41","data_read_per_join":"187"},"used_columns":["id","locale","alias","name","dir","active","created_at","updated_at"],"attached_condition":"(`zammad_development`.`locales`.`active` = 1)"}}},"backtrace":["app/models/translation.rb:475:in `locals_to_sync'","app/models/translation.rb:317:in `load_from_file'","app/models/translation.rb:23:in `sync'","db/seeds.rb:34:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'"]},{"sql":"SELECT `translations`.`id`, `translations`.`locale`, `translations`.`source`, `translations`.`format`, `translations`.`target`, `translations`.`target_initial` FROM `translations` WHERE `translations`.`locale` = 'de-de'","table":"translations","md5":"bf92072462c1172d81b1ecc95d0870f5","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.00039224999999999997,"rows_read":1569,"index":"index_translations_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1569,"result_bytes":84726,"cost":0.03309609375}],"cost":0.033488343749999996,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1223.07"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_locale"],"key":"index_translations_on_locale","used_key_parts":["locale"],"key_length":"32","ref":["const"],"rows_examined_per_scan":1413,"rows_produced_per_join":1413,"filtered":"100.00","cost_info":{"read_cost":"1081.77","eval_cost":"141.30","prefix_cost":"1223.07","data_read_per_join":"6M"},"used_columns":["id","locale","source","target","target_initial","format"]}}},"backtrace":["app/models/translation.rb:448:in `to_database'","app/models/translation.rb:322:in `block in load_from_file'","app/models/translation.rb:317:in `each'","app/models/translation.rb:317:in `load_from_file'","app/models/translation.rb:23:in `sync'","db/seeds.rb:34:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'"]},{"sql":"SELECT 1 AS one FROM `calendars` WHERE `calendars`.`name` = 'United States/Montana' LIMIT 1","table":"calendars","md5":"6a58b26d70847dd066dbee9eed4066a0","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"calendars","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"calendars","access_type":"const","possible_keys":["index_calendars_on_name"],"key":"index_calendars_on_name","used_key_parts":["name"],"key_length":"753","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"11K"},"used_columns":["name"]}}},"backtrace":["app/models/concerns/can_uniq_name.rb:23:in `generate_uniq_name'","app/models/calendar.rb:43:in `init_setup'","db/seeds.rb:36:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:549:in `load_seed'"]},{"sql":"SELECT `calendars`.* FROM `calendars` WHERE `calendars`.`default` = 1 AND `calendars`.`updated_by_id` = 1 AND `calendars`.`created_by_id` = 1 LIMIT 1","table":"calendars","md5":"045fc468409b8c7aa27b1c23254308a4","messages":[{"tag":"access_type_ref","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":"fk_rails_2a2c81de1a","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":10757,"cost":0.004201953125}],"cost":0.004202203125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"calendars","access_type":"ref","possible_keys":["fk_rails_2a2c81de1a","fk_rails_1923375e08"],"key":"fk_rails_2a2c81de1a","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`calendars`.`updated_by_id` = 1) and (`zammad_development`.`calendars`.`default` = 1))"}}},"backtrace":["app/models/calendar.rb:49:in `init_setup'","db/seeds.rb:36:in `<top (required)>'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `block in load'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'","gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:286:in `load'","gems/railties-5.1.6.1/lib/rails/engine.rb:549:in `load_seed'","gems/activerecord-5.1.6.1/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND ((`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `tickets`.`id` IN (1))","table":"tickets","md5":"c0b137f322f0d2a574d76bde41eab5ba","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`state_type_id` IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE `ticket_state_types`.`name` = 'closed')","table":"ticket_states","md5":"4c781b307d5d369255bc8220400c1abc","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_state_types_on_name","index_used":["name"]},{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0853e2d094","index_used":["state_type_id"]},{"tag":"retsize","result_size":2,"result_bytes":94,"cost":3.671875e-05}],"cost":3.721875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"nested_loop":[{"table":{"table_name":"ticket_state_types","access_type":"const","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"index_ticket_state_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name"]}},{"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["fk_rails_0853e2d094"],"key":"fk_rails_0853e2d094","used_key_parts":["state_type_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}]}},"backtrace":["app/jobs/ticket_user_ticket_counter_job.rb:17:in `map'","app/jobs/ticket_user_ticket_counter_job.rb:17:in `block in perform'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `each_key'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'"]},{"sql":"SELECT COUNT(*) FROM `tickets` FORCE INDEX(`index_tickets_on_customer_id`) WHERE `tickets`.`customer_id` = 2 AND `tickets`.`state_id` = 4","table":"tickets","md5":"e2ad503061f1a44467a070e09f86ad29","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"56924.78"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","cost_info":{"read_cost":"17971.58","eval_cost":"38953.20","prefix_cost":"56924.78","data_read_per_join":"802M"},"used_columns":["state_id","customer_id"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` = 4)"}}},"backtrace":["app/jobs/ticket_user_ticket_counter_job.rb:22:in `block in perform'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `each_key'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE `tickets`.`customer_id` = 2 AND `tickets`.`state_id` IN (1, 2, 7, 3)","table":"tickets","md5":"03512b5d96ecffbfc4447f96bb222f98","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"56924.78"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","cost_info":{"read_cost":"17971.58","eval_cost":"38953.20","prefix_cost":"56924.78","data_read_per_join":"802M"},"used_columns":["state_id","customer_id"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` in (1,2,7,3))"}}},"backtrace":["app/jobs/ticket_user_ticket_counter_job.rb:22:in `block in perform'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `each_key'","app/jobs/ticket_user_ticket_counter_job.rb:15:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` WHERE `tickets`.`state_id` IN (SELECT `ticket_states`.`id` FROM `ticket_states` WHERE `ticket_states`.`state_type_id` IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE `ticket_state_types`.`name` IN ('new', 'open', 'pending reminder', 'pending action'))) LIMIT 20000","table":"tickets","md5":"5c3ffcc0ca3a105b730e2826579fa496","messages":[{"tag":"access_type_range","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_state_types_on_name","index_used":["name"]},{"tag":"join_type_ref","table_size":7,"table":"ticket_states","join_to":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0853e2d094","index_used":["state_type_id"]},{"tag":"join_type_ref","table_size":1000000,"table":"tickets","join_to":"ticket_states","cost":0.049999999999999996,"rows_read":200000,"index":"index_tickets_on_state_id","index_used":["state_id"]},{"tag":"retsize","result_size":20000,"result_bytes":80000,"cost":0.03125}],"cost":0.0812505,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"314599.28"},"nested_loop":[{"table":{"table_name":"ticket_state_types","access_type":"range","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"index_ticket_state_types_on_name","used_key_parts":["name"],"key_length":"752","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.73","eval_cost":"0.40","prefix_cost":"1.13","data_read_per_join":"6K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`ticket_state_types`.`name` in ('new','open','pending reminder','pending action'))"}},{"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["PRIMARY","fk_rails_0853e2d094"],"key":"fk_rails_0853e2d094","used_key_parts":["state_type_id"],"key_length":"4","ref":["zammad_development.ticket_state_types.id"],"rows_examined_per_scan":1,"rows_produced_per_join":4,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.00","eval_cost":"0.40","prefix_cost":"2.53","data_read_per_join":"6K"},"used_columns":["id","state_type_id"]}},{"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id"],"key":"index_tickets_on_state_id","used_key_parts":["state_id"],"key_length":"4","ref":["zammad_development.ticket_states.id"],"rows_examined_per_scan":779064,"rows_produced_per_join":3116256,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"2971.16","eval_cost":"311625.60","prefix_cost":"314599.28","data_read_per_join":"6G"},"used_columns":["id","state_id"]}}]}},"backtrace":["app/models/ticket/escalation.rb:19:in `rebuild_all'","app/jobs/sla_ticket_rebuild_escalation_job.rb:4:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `groups` WHERE `groups`.`email_address_id` IS NULL","table":"groups","md5":"078567e14ee3afc79cd1f7f6d9c76c47","messages":[{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_a828c3963d","index_used":["email_address_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_a828c3963d"],"key":"fk_rails_a828c3963d","used_key_parts":["email_address_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["email_address_id"],"attached_condition":"isnull(`zammad_development`.`groups`.`email_address_id`)"}}},"backtrace":["app/models/email_address.rb:81:in `update_email_address_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `groups`","table":"groups","md5":"64335f479468c017acda2edc8aa18c84","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/models/email_address.rb:82:in `update_email_address_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`email_address_id` IS NULL LIMIT 1","table":"groups","md5":"f1e5cd297b25589914b5e631b8c84253","messages":[{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_a828c3963d","index_used":["email_address_id"]},{"tag":"retsize","result_size":1,"result_bytes":82,"cost":3.203125e-05}],"cost":3.228125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_a828c3963d"],"key":"fk_rails_a828c3963d","used_key_parts":["email_address_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"isnull(`zammad_development`.`groups`.`email_address_id`)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/email_address.rb:86:in `update_email_address_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT `email_addresses`.* FROM `email_addresses` WHERE `email_addresses`.`id` = 1 LIMIT 1","table":"email_addresses","md5":"92f5b6fc72ccb7ab8f9621836eebdcb1","messages":[{"tag":"access_type_const","table":"email_addresses"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_history.rb:72:in `block in history_update'","app/models/concerns/has_history.rb:56:in `each'","app/models/concerns/has_history.rb:56:in `history_update'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`name` = 'new'","table":"ticket_states","md5":"cd6f38a73d687158cd5a15c372b8ba38","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"index_ticket_states_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_states","access_type":"const","possible_keys":["index_ticket_states_on_name"],"key":"index_ticket_states_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","spec/factories/ticket.rb:6:in `block (3 levels) in <top (required)>'","gems/factory_bot-4.8.2/lib/factory_bot/attribute/dynamic.rb:16:in `instance_exec'","gems/factory_bot-4.8.2/lib/factory_bot/attribute/dynamic.rb:16:in `block in to_proc'","gems/factory_bot-4.8.2/lib/factory_bot/evaluator.rb:77:in `instance_exec'","gems/factory_bot-4.8.2/lib/factory_bot/evaluator.rb:77:in `block in define_attribute'","gems/factory_bot-4.8.2/lib/factory_bot/attribute_assigner.rb:56:in `get'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`name` = '2 normal'","table":"ticket_priorities","md5":"e0a4c83fd92c1608963d214e4621c1a2","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_priorities","cost":2.5e-07,"rows_read":1,"index":"index_ticket_priorities_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_priorities","access_type":"const","possible_keys":["index_ticket_priorities_on_name"],"key":"index_ticket_priorities_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","spec/factories/ticket.rb:7:in `block (3 levels) in <top (required)>'","gems/factory_bot-4.8.2/lib/factory_bot/attribute/dynamic.rb:16:in `instance_exec'","gems/factory_bot-4.8.2/lib/factory_bot/attribute/dynamic.rb:16:in `block in to_proc'","gems/factory_bot-4.8.2/lib/factory_bot/evaluator.rb:77:in `instance_exec'","gems/factory_bot-4.8.2/lib/factory_bot/evaluator.rb:77:in `block in define_attribute'","gems/factory_bot-4.8.2/lib/factory_bot/attribute_assigner.rb:56:in `get'"]},{"sql":"SELECT `online_notifications`.* FROM `online_notifications` WHERE `online_notifications`.`object_lookup_id` = 2 AND `online_notifications`.`o_id` = 3 ORDER BY created_at DESC, id DESC LIMIT 10000","table":"online_notifications","md5":"5e0511d8ea56d9d427abceaf28d9969f","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"online_notifications","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.10"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"online_notifications","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","type_lookup_id","user_id","seen","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`online_notifications`.`o_id` = 3) and (`zammad_development`.`online_notifications`.`object_lookup_id` = 2))"}}}},"backtrace":["app/jobs/ticket_online_notification_seen_job.rb:8:in `block in perform'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`id` = 1 LIMIT 1","table":"ticket_articles","md5":"95069d580156d1a540b2157743a4e2a6","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_articles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}},"backtrace":["app/models/observer/transaction.rb:122:in `block in get_uniq_changes'","app/models/observer/transaction.rb:117:in `each'","app/models/observer/transaction.rb:117:in `get_uniq_changes'","app/models/observer/transaction.rb:42:in `perform'","app/models/observer/transaction.rb:18:in `commit'","app/models/transaction.rb:16:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'"]},{"sql":"SELECT `triggers`.* FROM `triggers` WHERE `triggers`.`active` = 1 ORDER BY `triggers`.`name` ASC","table":"triggers","md5":"c60cb5b600f48fce1f7a5a59ead32732","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"triggers","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":3579,"cost":0.001398046875}],"cost":0.001398796875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.55"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"triggers","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"1K"},"used_columns":["id","name","condition","perform","disable_notification","note","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`triggers`.`active` = 1)"}}}},"backtrace":["app/models/ticket.rb:997:in `perform_triggers'","app/models/transaction/trigger.rb:40:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/observer/transaction.rb:48:in `block (3 levels) in perform'","app/models/observer/transaction.rb:47:in `each'","app/models/observer/transaction.rb:47:in `block (2 levels) in perform'","app/models/observer/transaction.rb:44:in `each_value'","app/models/observer/transaction.rb:44:in `block in perform'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.id = articles.ticket_id AND (`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `articles`.`type_id` IN (1,5,11) AND `articles`.`sender_id` IN (2) AND `tickets`.`id` IN (1) AND `articles`.`id` IN (1))","table":"tickets","md5":"29722c663d01dda39662440981f63f7c","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_const","table_size":null,"table":"articles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"nested_loop":[{"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY","index_tickets_on_state_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","state_id"]}},{"table":{"table_name":"articles","access_type":"const","possible_keys":["PRIMARY","index_ticket_articles_on_ticket_id","index_ticket_articles_on_type_id","index_ticket_articles_on_sender_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id"]}}]}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT DISTINCT `tickets`.* FROM `tickets` , ticket_articles articles WHERE (tickets.id = articles.ticket_id AND (`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `articles`.`type_id` IN (1,5,11) AND `articles`.`sender_id` IN (2) AND `tickets`.`id` IN (1) AND `articles`.`id` IN (1)) ORDER BY `tickets`.`id` ASC LIMIT 1","table":"tickets","md5":"2150b3b9bca6c971ae33a58030002019","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_const","table_size":null,"table":"articles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"ordering_operation":{"using_filesort":false,"duplicates_removal":{"using_filesort":false,"nested_loop":[{"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY","index_tickets_on_state_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}},{"table":{"table_name":"articles","access_type":"const","possible_keys":["PRIMARY","index_ticket_articles_on_ticket_id","index_ticket_articles_on_type_id","index_ticket_articles_on_sender_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","distinct":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id"]}}]}}}},"backtrace":["app/models/ticket.rb:1108:in `block (2 levels) in perform_triggers'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket.rb:1011:in `block in perform_triggers'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/transaction.rb:10:in `execute'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`email` = 'Nicole Braun <nicole.braun@zammad.org>'","table":"users","md5":"6b4a965b63142729184c6738c15eb960","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"index_users_on_email","index_used":["email"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_email"],"key":"index_users_on_email","used_key_parts":["email"],"key_length":"768","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1337:in `block in send_email_notification'","app/models/ticket.rb:1333:in `each'","app/models/ticket.rb:1333:in `send_email_notification'","app/models/ticket.rb:958:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'","app/models/ticket.rb:1139:in `block (2 levels) in perform_triggers'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `ticket_article_senders`.* FROM `ticket_article_senders` WHERE `ticket_article_senders`.`name` = 'System' LIMIT 1","table":"ticket_article_senders","md5":"513586973fc50508889202a689901cec","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_article_senders","cost":2.5e-07,"rows_read":1,"index":"index_ticket_article_senders_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_senders","access_type":"const","possible_keys":["index_ticket_article_senders_on_name"],"key":"index_ticket_article_senders_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1401:in `block (2 levels) in send_email_notification'","app/models/ticket.rb:1398:in `each'","app/models/ticket.rb:1398:in `block in send_email_notification'","app/models/ticket.rb:1333:in `each'","app/models/ticket.rb:1333:in `send_email_notification'","app/models/ticket.rb:958:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'"]},{"sql":"SELECT `ticket_article_types`.* FROM `ticket_article_types` WHERE `ticket_article_types`.`name` = 'email' LIMIT 1","table":"ticket_article_types","md5":"7d369062c47957aae80b059a84d6e7e0","messages":[{"tag":"access_type_const","table_size":12,"table":"ticket_article_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_article_types_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_article_types","access_type":"const","possible_keys":["index_ticket_article_types_on_name"],"key":"index_ticket_article_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","communication","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1402:in `block (2 levels) in send_email_notification'","app/models/ticket.rb:1398:in `each'","app/models/ticket.rb:1398:in `block in send_email_notification'","app/models/ticket.rb:1333:in `each'","app/models/ticket.rb:1333:in `send_email_notification'","app/models/ticket.rb:958:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 1 AND `ticket_articles`.`sender_id` = 3 AND `ticket_articles`.`type_id` = 1 AND (ticket_articles.created_at > '2019-02-25 15:54:26.124227' AND ticket_articles.to LIKE '%nicole.braun@zammad.org%')","table":"ticket_articles","md5":"c2c005f66ccc1d8344117892e99add84","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id","index_ticket_articles_on_created_at","index_ticket_articles_on_type_id","index_ticket_articles_on_sender_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"21K"},"used_columns":["ticket_id","type_id","sender_id","to","created_at"],"attached_condition":"((`zammad_development`.`ticket_articles`.`type_id` = 1) and (`zammad_development`.`ticket_articles`.`sender_id` = 3) and (`zammad_development`.`ticket_articles`.`created_at` > '2019-02-25 15:54:26.124227') and (`zammad_development`.`ticket_articles`.`to` like '%nicole.braun@zammad.org%'))"}}},"backtrace":["app/models/ticket.rb:1403:in `block (2 levels) in send_email_notification'","app/models/ticket.rb:1398:in `each'","app/models/ticket.rb:1398:in `block in send_email_notification'","app/models/ticket.rb:1333:in `each'","app/models/ticket.rb:1333:in `send_email_notification'","app/models/ticket.rb:958:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE `ticket_articles`.`sender_id` = 3 AND `ticket_articles`.`type_id` = 1 AND (ticket_articles.created_at > '2019-02-25 15:54:26.202977' AND ticket_articles.to LIKE '%nicole.braun@zammad.org%')","table":"ticket_articles","md5":"0ae1499165c902cf6a500e6273acc082","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"index_ticket_articles_on_type_id","index_used":["type_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_created_at","index_ticket_articles_on_type_id","index_ticket_articles_on_sender_id"],"key":"index_ticket_articles_on_type_id","used_key_parts":["type_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"21K"},"used_columns":["type_id","sender_id","to","created_at"],"attached_condition":"((`zammad_development`.`ticket_articles`.`sender_id` = 3) and (`zammad_development`.`ticket_articles`.`created_at` > '2019-02-25 15:54:26.202977') and (`zammad_development`.`ticket_articles`.`to` like '%nicole.braun@zammad.org%'))"}}},"backtrace":["app/models/ticket.rb:1424:in `block (2 levels) in send_email_notification'","app/models/ticket.rb:1420:in `each'","app/models/ticket.rb:1420:in `block in send_email_notification'","app/models/ticket.rb:1333:in `each'","app/models/ticket.rb:1333:in `send_email_notification'","app/models/ticket.rb:958:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'"]},{"sql":"SELECT `cti_logs`.`id` FROM `cti_logs` ORDER BY created_at DESC, id DESC LIMIT 60","table":"cti_logs","md5":"09525451264f2273b0f4d15b5ad8ade0","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"cti_logs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"cti_logs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"5K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/cti/log.rb:442:in `push_caller_list_update?'","app/models/cti/log.rb:449:in `push_caller_list_update'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'"]},{"sql":"SELECT DISTINCT `users`.* FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` WHERE ((roles_users.role_id IN (2)) AND users.active = 1) ORDER BY `users`.`id` ASC","table":"users","md5":"81eb6fe08de6331bfddf20f054685417","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"roles_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.00039151562500000005,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.95"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"0.25"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`user_id` is not null)"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}}]}}}},"backtrace":["app/models/cti/log.rb:453:in `push_caller_list_update'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_commit_callbacks'"]},{"sql":"SELECT MAX(id) as caller_id FROM `cti_caller_ids` WHERE `cti_caller_ids`.`caller_id` = '1234567890' AND `cti_caller_ids`.`level` = 'known' GROUP BY `cti_caller_ids`.`user_id` ORDER BY caller_id DESC LIMIT 20","table":"cti_caller_ids","md5":"ae992ad68dbd87bc1128eb98f0f85e54","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"index_cti_caller_ids_on_caller_id_and_user_id","index_used":["caller_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"grouping_operation":{"using_filesort":false,"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["index_cti_caller_ids_on_caller_id","index_cti_caller_ids_on_caller_id_and_level","index_cti_caller_ids_on_caller_id_and_user_id","fk_rails_f03ef195fa"],"key":"index_cti_caller_ids_on_caller_id_and_user_id","used_key_parts":["caller_id"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`cti_caller_ids`.`caller_id` <=> '1234567890')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","caller_id","level","user_id"],"attached_condition":"(`zammad_development`.`cti_caller_ids`.`level` = 'known')"}}}}},"backtrace":["app/models/cti/caller_id.rb:61:in `map'","app/models/cti/caller_id.rb:61:in `block in lookup'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `find'","app/models/cti/caller_id.rb:62:in `lookup'"]},{"sql":"SELECT MAX(id) as caller_id FROM `cti_caller_ids` WHERE `cti_caller_ids`.`caller_id` = '1234567890' GROUP BY `cti_caller_ids`.`user_id` ORDER BY caller_id DESC LIMIT 20","table":"cti_caller_ids","md5":"6ab3997f62e289208dabfbe915e1ac98","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"index_cti_caller_ids_on_caller_id_and_user_id","index_used":["caller_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"grouping_operation":{"using_filesort":false,"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["index_cti_caller_ids_on_caller_id","index_cti_caller_ids_on_caller_id_and_level","index_cti_caller_ids_on_caller_id_and_user_id","fk_rails_f03ef195fa"],"key":"index_cti_caller_ids_on_caller_id_and_user_id","used_key_parts":["caller_id"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","caller_id","user_id"],"attached_condition":"((`zammad_development`.`cti_caller_ids`.`caller_id` <=> '1234567890'))"}}}}},"backtrace":["app/models/cti/caller_id.rb:61:in `map'","app/models/cti/caller_id.rb:61:in `block in lookup'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `find'","app/models/cti/caller_id.rb:62:in `lookup'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`id` IS NULL ORDER BY `cti_caller_ids`.`id` DESC","table":"cti_caller_ids","md5":"7b2382803c6f7299841fb16dd820b098","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/cti/caller_id.rb:64:in `lookup'","app/models/cti/caller_id.rb:285:in `get_comment_preferences'","app/jobs/update_cti_logs_by_caller_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'"]},{"sql":"SELECT `cti_logs`.* FROM `cti_logs` WHERE `cti_logs`.`from` = '1234567890' AND `cti_logs`.`direction` = 'in' ORDER BY `cti_logs`.`created_at` DESC LIMIT 60 OFFSET 0","table":"cti_logs","md5":"7d71dabd418a1954e29949aba69266cc","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_logs","cost":2.5e-07,"rows_read":1,"index":"index_cti_logs_on_direction","index_used":["direction"]},{"tag":"retsize","result_size":1,"result_bytes":41,"cost":1.6015625e-05}],"cost":1.6265625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"cti_logs","access_type":"ref","possible_keys":["index_cti_logs_on_direction","index_cti_logs_on_from"],"key":"index_cti_logs_on_direction","used_key_parts":["direction"],"key_length":"62","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`cti_logs`.`direction` <=> 'in')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"5K"},"used_columns":["id","direction","state","from","from_comment","to","to_comment","queue","call_id","comment","initialized_at","start_at","end_at","duration_waiting_time","duration_talking_time","done","preferences","created_at","updated_at"],"attached_condition":"(`zammad_development`.`cti_logs`.`from` = '1234567890')"}}}},"backtrace":["app/jobs/update_cti_logs_by_caller_job.rb:9:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'","gems/activejob-5.1.6.1/lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'"]},{"sql":"SELECT `cti_caller_ids`.`id` FROM `cti_caller_ids` WHERE `cti_caller_ids`.`object` = 'User' AND `cti_caller_ids`.`o_id` = 12","table":"cti_caller_ids","md5":"585bd71304c9b7e795eeaf0eb3a0b81d","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"index_cti_caller_ids_on_object_and_o_id","index_used":["object","o_id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["index_cti_caller_ids_on_object_and_o_id"],"key":"index_cti_caller_ids_on_object_and_o_id","used_key_parts":["object","o_id"],"key_length":"306","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","object","o_id"]}}},"backtrace":["app/models/cti/caller_id.rb:131:in `build_item'","app/models/cti/caller_id.rb:85:in `build'","app/models/user.rb:1271:in `update_caller_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT `cti_caller_ids`.`id` FROM `cti_caller_ids` WHERE `cti_caller_ids`.`object` = 'User' AND `cti_caller_ids`.`o_id` = 12 AND `cti_caller_ids`.`caller_id` = '1234567890' AND `cti_caller_ids`.`level` = 'known' AND `cti_caller_ids`.`user_id` = 12","table":"cti_caller_ids","md5":"f438c91e4321bdd155953965d0691f18","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"index_cti_caller_ids_on_caller_id","index_used":["caller_id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["index_cti_caller_ids_on_caller_id","index_cti_caller_ids_on_caller_id_and_level","index_cti_caller_ids_on_caller_id_and_user_id","index_cti_caller_ids_on_object_and_o_id","fk_rails_f03ef195fa"],"key":"index_cti_caller_ids_on_caller_id","used_key_parts":["caller_id"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","caller_id","level","object","o_id","user_id"],"attached_condition":"((`zammad_development`.`cti_caller_ids`.`user_id` = 12) and (`zammad_development`.`cti_caller_ids`.`o_id` = 12) and (`zammad_development`.`cti_caller_ids`.`object` = 'User') and (`zammad_development`.`cti_caller_ids`.`level` = 'known'))"}}},"backtrace":["app/models/cti/caller_id.rb:139:in `block in build_item'","app/models/cti/caller_id.rb:132:in `each'","app/models/cti/caller_id.rb:132:in `build_item'","app/models/cti/caller_id.rb:85:in `build'","app/models/user.rb:1271:in `update_caller_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`caller_id` = '1234567890' AND `cti_caller_ids`.`level` = 'known' AND `cti_caller_ids`.`object` = 'User' AND `cti_caller_ids`.`o_id` = 12 AND `cti_caller_ids`.`user_id` = 12 LIMIT 1","table":"cti_caller_ids","md5":"4b6494dd063d3e317a4c0381a5da7193","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"index_cti_caller_ids_on_caller_id","index_used":["caller_id"]},{"tag":"retsize","result_size":1,"result_bytes":28,"cost":1.09375e-05}],"cost":1.11875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["index_cti_caller_ids_on_caller_id","index_cti_caller_ids_on_caller_id_and_level","index_cti_caller_ids_on_caller_id_and_user_id","index_cti_caller_ids_on_object_and_o_id","fk_rails_f03ef195fa"],"key":"index_cti_caller_ids_on_caller_id","used_key_parts":["caller_id"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","caller_id","comment","level","object","o_id","user_id","preferences","created_at","updated_at"],"attached_condition":"((`zammad_development`.`cti_caller_ids`.`user_id` = 12) and (`zammad_development`.`cti_caller_ids`.`o_id` = 12) and (`zammad_development`.`cti_caller_ids`.`level` = 'known') and (`zammad_development`.`cti_caller_ids`.`object` = 'User'))"}}},"backtrace":["app/models/cti/caller_id.rb:29:in `maybe_add'","app/models/cti/caller_id.rb:154:in `block in build_item'","app/models/cti/caller_id.rb:153:in `each'","app/models/cti/caller_id.rb:153:in `build_item'","app/models/cti/caller_id.rb:85:in `build'","app/models/user.rb:1271:in `update_caller_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`id` = 1 ORDER BY `cti_caller_ids`.`id` DESC","table":"cti_caller_ids","md5":"5e64ef2165a8a463892fc8632900b5d7","messages":[{"tag":"access_type_const","table":"cti_caller_ids"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/cti/caller_id.rb:64:in `lookup'","app/models/cti/caller_id.rb:285:in `get_comment_preferences'","app/jobs/update_cti_logs_by_caller_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 13 AND `user_devices`.`fingerprint` = 'fingerprintABC123'","table":"user_devices","md5":"b18f654ba420a781ef410264c63aca3a","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id","index_user_devices_on_fingerprint"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"],"attached_condition":"(`zammad_development`.`user_devices`.`fingerprint` = 'fingerprintABC123')"}}},"backtrace":["app/models/user_device.rb:46:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 13 AND `user_devices`.`os` = 'Mac' AND `user_devices`.`browser` = 'Chrome' AND `user_devices`.`location` = 'United States' AND `user_devices`.`fingerprint` = 'fingerprintABC123' LIMIT 1","table":"user_devices","md5":"f72b07ac683bbf1a9b7ebdefb63cbf62","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id","index_user_devices_on_os_and_browser_and_location","index_user_devices_on_fingerprint"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"],"attached_condition":"((`zammad_development`.`user_devices`.`os` = 'Mac') and (`zammad_development`.`user_devices`.`browser` = 'Chrome') and (`zammad_development`.`user_devices`.`location` = 'United States') and (`zammad_development`.`user_devices`.`fingerprint` = 'fingerprintABC123'))"}}},"backtrace":["app/models/user_device.rb:101:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `user_devices` WHERE `user_devices`.`user_id` = 13","table":"user_devices","md5":"053c788f966235dfba1899158c9960e8","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["user_id"]}}},"backtrace":["app/models/user_device.rb:128:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`name` = 'Customer' LIMIT 1","table":"roles","md5":"6119171f92854023897bb17914f05555","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"index_roles_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"roles","access_type":"const","possible_keys":["index_roles_on_name"],"key":"index_roles_on_name","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/article_customer.rb:79:in `roles'","lib/import/otrs/article_customer.rb:63:in `create'","lib/import/otrs/article_customer.rb:51:in `find_or_create'","lib/import/otrs/article_customer.rb:45:in `import'","lib/import/otrs/article_customer.rb:7:in `initialize'","spec/lib/import/otrs/article_customer_spec.rb:13:in `new'","spec/lib/import/otrs/article_customer_spec.rb:13:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`name` = 'test922896' LIMIT 1","table":"organizations","md5":"74ab67b0bab833d9d4c8ebc6b3403b14","messages":[{"tag":"access_type_const","table":"organizations"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/import/otrs/customer.rb:46:in `updated?'","lib/import/otrs/customer.rb:40:in `create_or_update'","lib/import/otrs/customer.rb:36:in `import'","lib/import/otrs/customer.rb:17:in `initialize'","spec/lib/import/otrs/customer_spec.rb:24:in `new'","spec/lib/import/otrs/customer_spec.rb:24:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`name` IS NULL AND `ticket_priorities`.`active` = 1 LIMIT 1","table":"ticket_priorities","md5":"1612a81096fb3e77ecf918b0369a6b1c","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/import/otrs/priority_factory.rb:21:in `update_attribute'","lib/import/otrs/priority_factory.rb:17:in `update_attribute_settings'","lib/import/otrs/priority_factory.rb:11:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","spec/lib/import/otrs/priority_factory_spec.rb:13:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT `ticket_priorities`.* FROM `ticket_priorities` WHERE `ticket_priorities`.`name` = '1 low' AND `ticket_priorities`.`active` = 1 LIMIT 1","table":"ticket_priorities","md5":"65261f7c858c3cec2dde31fbdd9c3ef8","messages":[{"tag":"access_type_const","table_size":3,"table":"ticket_priorities","cost":2.5e-07,"rows_read":1,"index":"index_ticket_priorities_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_priorities","access_type":"const","possible_keys":["index_ticket_priorities_on_name"],"key":"index_ticket_priorities_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","default_create","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/priority_factory.rb:21:in `update_attribute'","lib/import/otrs/priority_factory.rb:17:in `update_attribute_settings'","spec/lib/import/otrs/priority_factory_spec.rb:24:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `ticket_state_types`.* FROM `ticket_state_types` WHERE `ticket_state_types`.`name` = 'new'","table":"ticket_state_types","md5":"46dd2a29e726733c8e70a90467d87c37","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_state_types_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_state_types","access_type":"const","possible_keys":["index_ticket_state_types_on_name"],"key":"index_ticket_state_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","lib/import/otrs/state.rb:63:in `state_type_id'","lib/import/otrs/state.rb:56:in `map'","lib/import/otrs/state.rb:25:in `import'","lib/import/otrs/state.rb:19:in `initialize'","lib/import/base_factory.rb:34:in `new'","lib/import/base_factory.rb:34:in `create_instance'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`name` IS NULL AND `ticket_states`.`active` = 1 LIMIT 1","table":"ticket_states","md5":"abd9fd88123b1f853d1c43c638038d24","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/import/otrs/state_factory.rb:39:in `update_default_create'","lib/import/otrs/state_factory.rb:34:in `update_attribute'","lib/import/otrs/state_factory.rb:29:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'"]},{"sql":"SELECT `ticket_states`.`id` FROM `ticket_states` WHERE `ticket_states`.`state_type_id` IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE (`ticket_state_types`.`name` NOT IN ('merged', 'removed')))","table":"ticket_states","md5":"837abd794f7a674d7009f06172f33152","messages":[{"tag":"access_type_index","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"fk_rails_0853e2d094","index_used":["state_type_id"]},{"tag":"join_type_eq_ref","table_size":7,"table":"ticket_state_types","join_to":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":7,"result_bytes":28,"cost":1.09375e-05}],"cost":1.44375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"3.40"},"nested_loop":[{"table":{"table_name":"ticket_states","access_type":"index","possible_keys":["fk_rails_0853e2d094"],"key":"fk_rails_0853e2d094","used_key_parts":["state_type_id"],"key_length":"4","rows_examined_per_scan":7,"rows_produced_per_join":7,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.70","prefix_cost":"0.95","data_read_per_join":"10K"},"used_columns":["id","state_type_id"]}},{"table":{"table_name":"ticket_state_types","access_type":"eq_ref","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_states.state_type_id"],"rows_examined_per_scan":1,"rows_produced_per_join":6,"filtered":"85.71","cost_info":{"read_cost":"1.75","eval_cost":"0.60","prefix_cost":"3.40","data_read_per_join":"9K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`ticket_state_types`.`name` not in ('merged','removed'))"}}]}},"backtrace":["lib/import/otrs/state_factory.rb:69:in `update_ticket_state'","lib/import/otrs/state_factory.rb:61:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'"]},{"sql":"SELECT `overviews`.* FROM `overviews`","table":"overviews","md5":"665ce1adf4d657c8c17f06baa2423d02","messages":[{"tag":"access_type_tablescan","table_size":9,"table":"overviews","cost":2.25e-06,"rows_read":9,"index":null,"index_used":null},{"tag":"retsize","result_size":9,"result_bytes":5985,"cost":0.002337890625}],"cost":0.002340140625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.15"},"table":{"table_name":"overviews","access_type":"ALL","rows_examined_per_scan":9,"rows_produced_per_join":9,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.90","prefix_cost":"1.15","data_read_per_join":"119K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/state_factory.rb:63:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT `triggers`.* FROM `triggers`","table":"triggers","md5":"4141518aafe9fd977e516a8d327194cb","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"triggers","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":3579,"cost":0.001398046875}],"cost":0.001398796875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"triggers","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"4K"},"used_columns":["id","name","condition","perform","disable_notification","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/state_factory.rb:63:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`state_type_id` IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE `ticket_state_types`.`name` = 'closed') ORDER BY `ticket_states`.`id` ASC LIMIT 1","table":"ticket_states","md5":"2a90183d86ca31e258b989b2c522144f","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"index_ticket_state_types_on_name","index_used":["name"]},{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0853e2d094","index_used":["state_type_id"]},{"tag":"retsize","result_size":1,"result_bytes":47,"cost":1.8359375e-05}],"cost":1.8859375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"nested_loop":[{"table":{"table_name":"ticket_state_types","access_type":"const","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"index_ticket_state_types_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name"]}},{"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["fk_rails_0853e2d094"],"key":"fk_rails_0853e2d094","used_key_parts":["state_type_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`ticket_states`.`state_type_id` <=> '5')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}]}}},"backtrace":["lib/user_info.rb:16:in `ensure_current_user_id'","app/models/concerns/can_seed.rb:14:in `seed'","app/models/concerns/can_seed.rb:10:in `reseed'","lib/import/otrs/state_factory.rb:127:in `reseed_dependent_objects'","lib/import/otrs/state_factory.rb:63:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'"]},{"sql":"SELECT `macros`.* FROM `macros`","table":"macros","md5":"2ba64add32ef77de2f886b2be608faa7","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"macros","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":415,"cost":0.000162109375}],"cost":0.00016235937500000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"macros","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","name","perform","active","ux_flow_next_up","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/state_factory.rb:63:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`default_follow_up` = 1 LIMIT 1","table":"ticket_states","md5":"9d6763ab2cfe6979973b740a24d428ee","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":7.5e-07,"rows_read":3,"index":"index_ticket_states_on_default_follow_up","index_used":["default_follow_up"]},{"tag":"retsize","result_size":1,"result_bytes":47,"cost":1.8359375e-05}],"cost":1.9109375000000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["index_ticket_states_on_default_follow_up"],"key":"index_ticket_states_on_default_follow_up","used_key_parts":["default_follow_up"],"key_length":"1","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/user_info.rb:16:in `ensure_current_user_id'","app/models/concerns/can_seed.rb:14:in `seed'","lib/import/otrs/state_factory.rb:133:in `reseed_dependent_objects'","lib/import/otrs/state_factory.rb:63:in `update_ticket_attributes'","lib/import/otrs/state_factory.rb:30:in `update_attribute_settings'","lib/import/otrs/state_factory.rb:23:in `import_loop'","lib/import/base_factory.rb:7:in `import_action'","lib/import/transaction_factory.rb:10:in `block in import'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`name` = 'new' AND `ticket_states`.`active` = 1 LIMIT 1","table":"ticket_states","md5":"a91458502f8e9ab4696c639b1f5279ee","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"index_ticket_states_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_states","access_type":"const","possible_keys":["index_ticket_states_on_name"],"key":"index_ticket_states_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/state_factory.rb:39:in `update_default_create'","lib/import/otrs/state_factory.rb:34:in `update_attribute'","spec/lib/import/otrs/state_factory_spec.rb:87:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`id` IN (2, 1)","table":"roles","md5":"c444d505bf283e2ba4e444f6220d7395","messages":[{"tag":"access_type_range","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":136,"cost":5.3125000000000004e-05}],"cost":5.3375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"table":{"table_name":"roles","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"2K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`roles`.`id` in (2,1))"}}},"backtrace":["lib/import/otrs/user.rb:53:in `create'","lib/import/otrs/user.rb:34:in `create_or_update'","lib/import/otrs/user.rb:27:in `import'","lib/import/otrs/user.rb:21:in `initialize'","spec/lib/import/otrs/user_spec.rb:69:in `new'","spec/lib/import/otrs/user_spec.rb:69:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`id` = 1","table":"groups","md5":"36adcfb4c8358dc174d955b33629f95d","messages":[{"tag":"access_type_const","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"groups","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/import/otrs/user.rb:53:in `create'","lib/import/otrs/user.rb:34:in `create_or_update'","lib/import/otrs/user.rb:27:in `import'","lib/import/otrs/user.rb:21:in `initialize'","spec/lib/import/otrs/user_spec.rb:69:in `new'","spec/lib/import/otrs/user_spec.rb:69:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE 1=0","table":"groups","md5":"89b14622874e67ae915fa08ed60bfd8b","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/import/otrs/user.rb:53:in `create'","lib/import/otrs/user.rb:34:in `create_or_update'","lib/import/otrs/user.rb:27:in `import'","lib/import/otrs/user.rb:21:in `initialize'","spec/lib/import/otrs/user_spec.rb:69:in `new'","spec/lib/import/otrs/user_spec.rb:69:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:298:in `block (2 levels) in let'","gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` WHERE (to_create = 1 OR to_migrate = 1 OR to_delete = 1 OR to_config = 1)","table":"object_manager_attributes","md5":"a1e402960fcba5f83e7c18ee871fb9ef","messages":[{"tag":"access_type_tablescan","table_size":48,"table":"object_manager_attributes","cost":1.2e-05,"rows_read":48,"index":null,"index_used":null},{"tag":"retsize","result_size":48,"result_bytes":32496,"cost":0.01269375}],"cost":0.01270575,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"5.80"},"table":{"table_name":"object_manager_attributes","access_type":"ALL","rows_examined_per_scan":48,"rows_produced_per_join":16,"filtered":"34.39","cost_info":{"read_cost":"4.15","eval_cost":"1.65","prefix_cost":"5.80","data_read_per_join":"122K"},"used_columns":["id","object_lookup_id","name","display","data_type","data_option","data_option_new","editable","active","screens","to_create","to_migrate","to_delete","to_config","position","created_by_id","updated_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`object_manager_attributes`.`to_create` = 1) or (`zammad_development`.`object_manager_attributes`.`to_migrate` = 1) or (`zammad_development`.`object_manager_attributes`.`to_delete` = 1) or (`zammad_development`.`object_manager_attributes`.`to_config` = 1))"}}},"backtrace":["app/models/object_manager/attribute.rb:631:in `migration_execute'","lib/import/zendesk/object_attribute/base.rb:20:in `add'","lib/import/zendesk/object_attribute/base.rb:11:in `initialize'","spec/lib/import/zendesk/object_attribute/base_examples.rb:36:in `new'","spec/lib/import/zendesk/object_attribute/base_examples.rb:36:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT `activity_streams`.* FROM `activity_streams` WHERE `activity_streams`.`activity_stream_object_id` = 2 AND `activity_streams`.`o_id` = 10","table":"activity_streams","md5":"91c319d0ce8938011a8b10de13e78b05","messages":[{"tag":"access_type_index_merge","table_size":6,"table":"activity_streams","cost":2.5e-07,"rows_read":1,"index":"intersect(index_activity_streams_on_o_id,index_activity_streams_on_activity_stream_object_id)","index_used":null},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"table":{"table_name":"activity_streams","access_type":"index_merge","possible_keys":["index_activity_streams_on_o_id","index_activity_streams_on_activity_stream_object_id"],"key":"intersect(index_activity_streams_on_o_id,index_activity_streams_on_activity_stream_object_id)","key_length":"4,4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"48"},"used_columns":["id","activity_stream_type_id","activity_stream_object_id","permission_id","group_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`activity_streams`.`o_id` = 10) and (`zammad_development`.`activity_streams`.`activity_stream_object_id` = 2))"}}},"backtrace":["app/models/activity_stream.rb:97:in `remove'","app/models/concerns/has_activity_stream_log.rb:62:in `activity_stream_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `tag_objects`.* FROM `tag_objects` WHERE `tag_objects`.`name` = 'Ticket'","table":"tag_objects","md5":"2c027fca7bc51109736051a809d0c548","messages":[{"tag":"access_type_const","table_size":1,"table":"tag_objects","cost":2.5e-07,"rows_read":1,"index":"index_tag_objects_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["index_tag_objects_on_name"],"key":"index_tag_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/tag.rb:178:in `lookup_by_name_and_create'","app/models/tag.rb:118:in `tag_destroy'","app/models/concerns/has_tags.rb:71:in `tag_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'"]},{"sql":"SELECT `tags`.* FROM `tags` WHERE `tags`.`tag_object_id` = 1 AND `tags`.`o_id` = 10","table":"tags","md5":"7c440e647647981e8f2a748c393260ef","messages":[{"tag":"access_type_ref","table_size":1,"table":"tags","cost":2.5e-07,"rows_read":1,"index":"index_tags_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["id","tag_item_id","tag_object_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tags`.`tag_object_id` = 1)"}}},"backtrace":["app/models/tag.rb:128:in `tag_destroy'","app/models/concerns/has_tags.rb:71:in `tag_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `online_notifications`.* FROM `online_notifications` WHERE `online_notifications`.`object_lookup_id` = 2 AND `online_notifications`.`o_id` = 10","table":"online_notifications","md5":"69046926c528034145e195b4990bbe87","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"online_notifications","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"online_notifications","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","type_lookup_id","user_id","seen","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`online_notifications`.`o_id` = 10) and (`zammad_development`.`online_notifications`.`object_lookup_id` = 2))"}}},"backtrace":["app/models/online_notification.rb:91:in `remove'","app/models/concerns/has_online_notifications.rb:19:in `online_notification_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `karma_activity_logs`.* FROM `karma_activity_logs` WHERE `karma_activity_logs`.`object_lookup_id` = 2 AND `karma_activity_logs`.`o_id` = 10","table":"karma_activity_logs","md5":"6aabd828fc7c7e41eb1c76daea8b2317","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_o_id_and_object_lookup_id","index_used":["o_id","object_lookup_id"]},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_o_id_and_object_lookup_id"],"key":"index_karma_activity_logs_on_o_id_and_object_lookup_id","used_key_parts":["o_id","object_lookup_id"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","user_id","activity_id","score","score_total","created_at","updated_at"]}}},"backtrace":["app/models/karma/activity_log.rb:72:in `remove'","app/models/concerns/has_karma_activity_log.rb:19:in `karma_activity_log_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `link_objects`.* FROM `link_objects` WHERE `link_objects`.`name` = 'Ticket' LIMIT 1","table":"link_objects","md5":"da1fc9e088e0bc975c6fb74699a9aa6e","messages":[{"tag":"access_type_const","table_size":5,"table":"link_objects","cost":2.5e-07,"rows_read":1,"index":"index_link_objects_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"link_objects","access_type":"const","possible_keys":["index_link_objects_on_name"],"key":"index_link_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","active","created_at","updated_at"]}}},"backtrace":["app/models/link.rb:208:in `link_object_get'","app/models/link.rb:172:in `remove_all'","app/models/concerns/has_links.rb:19:in `links_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'"]},{"sql":"SELECT `links`.* FROM `links` WHERE `links`.`link_object_target_id` = 1 AND `links`.`link_object_target_value` = 10","table":"links","md5":"555427d86d79b924a73c0ed7af4821d3","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"links","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"links","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","link_type_id","link_object_source_id","link_object_source_value","link_object_target_id","link_object_target_value","created_at","updated_at"],"attached_condition":"((`zammad_development`.`links`.`link_object_target_value` = 10) and (`zammad_development`.`links`.`link_object_target_id` = 1))"}}},"backtrace":["app/models/link.rb:179:in `remove_all'","app/models/concerns/has_links.rb:19:in `links_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `links`.* FROM `links` WHERE `links`.`link_object_source_id` = 1 AND `links`.`link_object_source_value` = 10","table":"links","md5":"47fb1ef5425c3fc2a6b2ed78451d7a71","messages":[{"tag":"access_type_ref","table_size":0,"table":"links","cost":2.5e-07,"rows_read":1,"index":"links_uniq_total","index_used":["link_object_source_id","link_object_source_value"]},{"tag":"retsize","result_size":1,"result_bytes":40,"cost":1.5625e-05}],"cost":1.5875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"links","access_type":"ref","possible_keys":["links_uniq_total"],"key":"links_uniq_total","used_key_parts":["link_object_source_id","link_object_source_value"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","link_type_id","link_object_source_id","link_object_source_value","link_object_target_id","link_object_target_value","created_at","updated_at"]}}},"backtrace":["app/models/link.rb:183:in `remove_all'","app/models/concerns/has_links.rb:19:in `links_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `history_objects`.* FROM `history_objects` WHERE `history_objects`.`name` = 'Ticket' LIMIT 1","table":"history_objects","md5":"bc9ddea4955d210cc1cadc58915f2432","messages":[{"tag":"access_type_const","table_size":5,"table":"history_objects","cost":2.5e-07,"rows_read":1,"index":"index_history_objects_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_objects","access_type":"const","possible_keys":["index_history_objects_on_name"],"key":"index_history_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","created_at","updated_at"]}}},"backtrace":["app/models/history.rb:101:in `remove'","app/models/concerns/has_history.rb:118:in `history_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'"]},{"sql":"SELECT `histories`.* FROM `histories` WHERE `histories`.`history_object_id` = 4 AND `histories`.`o_id` = 10","table":"histories","md5":"9997dc5056c7c2cbe78e17bc58df8258","messages":[{"tag":"access_type_ref","table_size":10000000,"table":"histories","cost":1.0e-06,"rows_read":4,"index":"index_histories_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":4,"result_bytes":308,"cost":0.0001203125}],"cost":0.0001213125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"histories","access_type":"ref","possible_keys":["index_histories_on_o_id","index_histories_on_history_object_id","index_histories_on_o_id_and_history_object_id_and_related_o_id"],"key":"index_histories_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"52.63","cost_info":{"read_cost":"0.25","eval_cost":"0.05","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","history_type_id","history_object_id","history_attribute_id","o_id","related_o_id","related_history_object_id","id_to","id_from","value_from","value_to","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`histories`.`history_object_id` = 4)"}}},"backtrace":["app/models/history.rb:107:in `remove'","app/models/concerns/has_history.rb:118:in `history_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `object_manager_attributes` WHERE `object_manager_attributes`.`object_lookup_id` = 2 AND `object_manager_attributes`.`name` = 'select'","table":"object_manager_attributes","md5":"59349d2bd6df52a29f8f06e9980ec785","messages":[{"tag":"access_type_const","table":"object_manager_attributes"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/notification_factory/renderer.rb:203:in `display_value'","lib/notification_factory/renderer.rb:91:in `block in d'","lib/notification_factory/renderer.rb:85:in `each'","lib/notification_factory/renderer.rb:85:in `d'","(erb):1:in `render'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `eval'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `result'","lib/notification_factory/renderer.rb:37:in `render'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` WHERE `object_manager_attributes`.`object_lookup_id` = 2 AND `object_manager_attributes`.`name` = 'select' ORDER BY `object_manager_attributes`.`id` ASC LIMIT 1","table":"object_manager_attributes","md5":"13b99aac8be04097fbc3331132789a22","messages":[{"tag":"access_type_const","table":"object_manager_attributes"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/notification_factory/renderer.rb:203:in `display_value'","lib/notification_factory/renderer.rb:91:in `block in d'","lib/notification_factory/renderer.rb:85:in `each'","lib/notification_factory/renderer.rb:85:in `d'","(erb):1:in `render'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `eval'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `result'","lib/notification_factory/renderer.rb:37:in `render'"]},{"sql":"SELECT `triggers`.`name`, `triggers`.`condition` FROM `triggers`","table":"triggers","md5":"5dc810aacf2fe43c9e838f3664d2aa9c","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"triggers","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":1143,"cost":0.000446484375}],"cost":0.000447234375,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"triggers","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"4K"},"used_columns":["name","condition"]}}},"backtrace":["app/models/object_manager/attribute.rb:802:in `attribute_to_references_hash'","app/models/object_manager/attribute.rb:824:in `attribute_used_by_references?'","app/models/object_manager/attribute.rb:414:in `remove'","spec/lib/notification_factory/renderer_spec.rb:47:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `overviews`.`name`, `overviews`.`condition` FROM `overviews`","table":"overviews","md5":"c2da8ce42dc90c7427cd7817f52ab626","messages":[{"tag":"access_type_tablescan","table_size":9,"table":"overviews","cost":2.25e-06,"rows_read":9,"index":null,"index_used":null},{"tag":"retsize","result_size":9,"result_bytes":2700,"cost":0.0010546875}],"cost":0.0010569375000000002,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.15"},"table":{"table_name":"overviews","access_type":"ALL","rows_examined_per_scan":9,"rows_produced_per_join":9,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.90","prefix_cost":"1.15","data_read_per_join":"119K"},"used_columns":["name","condition"]}}},"backtrace":["app/models/object_manager/attribute.rb:802:in `attribute_to_references_hash'","app/models/object_manager/attribute.rb:824:in `attribute_used_by_references?'","app/models/object_manager/attribute.rb:414:in `remove'","spec/lib/notification_factory/renderer_spec.rb:47:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `jobs`.`name`, `jobs`.`condition` FROM `jobs`","table":"jobs","md5":"79684b2657af3224733261026185c718","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"9K"},"used_columns":["name","condition"]}}},"backtrace":["app/models/object_manager/attribute.rb:802:in `attribute_to_references_hash'","app/models/object_manager/attribute.rb:824:in `attribute_used_by_references?'","app/models/object_manager/attribute.rb:414:in `remove'","spec/lib/notification_factory/renderer_spec.rb:47:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`id` = 1 LIMIT 1 FOR UPDATE","table":"tickets","md5":"1f3badbdd75324f508b306dbf45c965e","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/observer/organization/ref_object_touch.rb:29:in `block in ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:27:in `each'","app/models/observer/organization/ref_object_touch.rb:27:in `ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:11:in `after_update'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1 FOR UPDATE","table":"users","md5":"29ce8057bf4f4951dfe19905d84797b0","messages":[{"tag":"access_type_const","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"users","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/observer/organization/ref_object_touch.rb:37:in `block in ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:35:in `each'","app/models/observer/organization/ref_object_touch.rb:35:in `ref_object_touch'","app/models/observer/organization/ref_object_touch.rb:11:in `after_update'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `translations`.`target` FROM `translations` WHERE `translations`.`locale` = 'en-us' AND `translations`.`source` = 'timestamp' AND `translations`.`format` = 'time'","table":"translations","md5":"eb4b30456e0fb3d179b1ed089ad1188d","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.00039224999999999997,"rows_read":1569,"index":"index_translations_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1569,"result_bytes":14121,"cost":0.0055160156250000005}],"cost":0.005908265625000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.93"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_source","index_translations_on_locale"],"key":"index_translations_on_locale","used_key_parts":["locale"],"key_length":"32","ref":["const"],"rows_examined_per_scan":2,"rows_produced_per_join":0,"filtered":"2.50","cost_info":{"read_cost":"1.73","eval_cost":"0.01","prefix_cost":"1.93","data_read_per_join":"231"},"used_columns":["locale","source","target","format"],"attached_condition":"((`zammad_development`.`translations`.`source` = 'timestamp') and (`zammad_development`.`translations`.`format` = 'time'))"}}},"backtrace":["app/models/translation.rb:241:in `timestamp'","lib/notification_factory/renderer.rb:176:in `convert_to_timezone'","lib/notification_factory/renderer.rb:148:in `d'","(erb):1:in `render'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `eval'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `result'","lib/notification_factory/renderer.rb:37:in `render'","lib/notification_factory/slack.rb:55:in `template'"]},{"sql":"SELECT `translations`.* FROM `translations` FORCE INDEX(`index_translations_on_source`) WHERE `translations`.`locale` = 'en-us' AND `translations`.`source` = 'Group'","table":"translations","md5":"9f1b174a666564985136eb73cd0f7d5a","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":8.5e-06,"rows_read":34,"index":"index_translations_on_source","index_used":["source"]},{"tag":"retsize","result_size":34,"result_bytes":2652,"cost":0.0010359375}],"cost":0.0010444375,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"33.76"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_source"],"key":"index_translations_on_source","used_key_parts":["source"],"key_length":"767","ref":["const"],"rows_examined_per_scan":35,"rows_produced_per_join":3,"filtered":"10.00","cost_info":{"read_cost":"30.27","eval_cost":"0.35","prefix_cost":"33.77","data_read_per_join":"15K"},"used_columns":["id","locale","source","target","target_initial","format","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`translations`.`locale` = 'en-us') and (`zammad_development`.`translations`.`source` = 'Group'))"}}},"backtrace":["app/models/translation.rb:203:in `translate'","lib/notification_factory/renderer.rb:161:in `t'","(erb):2:in `render'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `eval'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/erb.rb:896:in `result'","lib/notification_factory/renderer.rb:37:in `render'","lib/notification_factory/slack.rb:55:in `template'","spec/lib/notification_factory/slack_spec.rb:6:in `block (3 levels) in <top (required)>'"]},{"sql":"SELECT `external_syncs`.* FROM `external_syncs` WHERE `external_syncs`.`source` = 'Ldap::User' AND `external_syncs`.`source_id` = 'user1337' AND `external_syncs`.`object` = 'User' LIMIT 1","table":"external_syncs","md5":"17cb5610cd029d8158f5ff8f9588e807","messages":[{"tag":"access_type_const","table":"external_syncs"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/sequencer/unit/import/common/model/lookup/external_sync.rb:29:in `entry'","lib/sequencer/unit/import/common/model/lookup/external_sync.rb:17:in `process'","lib/sequencer/unit/import/common/model/mixin/skip/action.rb:47:in `process'","lib/sequencer/unit/base.rb:202:in `process'","lib/sequencer.rb:77:in `block (4 levels) in process'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","lib/sequencer.rb:76:in `block (3 levels) in process'","lib/sequencer/state.rb:150:in `process'"]},{"sql":"SELECT `external_syncs`.* FROM `external_syncs` WHERE `external_syncs`.`source` = 'Ldap::User' AND `external_syncs`.`object` = 'User' AND `external_syncs`.`o_id` = 48 LIMIT 1","table":"external_syncs","md5":"30ba471cb5102a1f501f1c7a37304add","messages":[{"tag":"access_type_ref","table_size":0,"table":"external_syncs","cost":2.5e-07,"rows_read":1,"index":"index_external_syncs_on_source_and_source_id","index_used":["source"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"external_syncs","access_type":"ref","possible_keys":["index_external_syncs_on_source_and_source_id","index_external_syncs_on_source_and_source_id_and_object_o_id","index_external_syncs_on_object_and_o_id"],"key":"index_external_syncs_on_source_and_source_id","used_key_parts":["source"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","source","source_id","object","o_id","last_payload","created_at","updated_at"],"attached_condition":"((`zammad_development`.`external_syncs`.`o_id` = 48) and (`zammad_development`.`external_syncs`.`object` = 'User'))"}}},"backtrace":["lib/sequencer/unit/import/common/model/external_sync/integrity.rb:31:in `entry'","lib/sequencer/unit/import/common/model/external_sync/integrity.rb:22:in `up_to_date?'","lib/sequencer/unit/import/common/model/external_sync/integrity.rb:14:in `process'","lib/sequencer/unit/base.rb:202:in `process'","lib/sequencer.rb:77:in `block (4 levels) in process'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","lib/sequencer.rb:76:in `block (3 levels) in process'","lib/sequencer/state.rb:150:in `process'"]},{"sql":"SELECT `external_syncs`.`o_id` FROM `external_syncs` INNER JOIN users ON (users.id = external_syncs.o_id) WHERE `external_syncs`.`source` = 'Ldap::User' AND `external_syncs`.`object` = 'User' AND `users`.`active` = 1","table":"external_syncs","md5":"62eee074bdfed1df86e1b1a6eceb0daf","messages":[{"tag":"access_type_ref","table_size":0,"table":"external_syncs","cost":2.5e-07,"rows_read":1,"index":"index_external_syncs_on_source_and_source_id","index_used":["source"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"external_syncs","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"external_syncs","access_type":"ref","possible_keys":["index_external_syncs_on_source_and_source_id","index_external_syncs_on_source_and_source_id_and_object_o_id","index_external_syncs_on_object_and_o_id"],"key":"index_external_syncs_on_source_and_source_id","used_key_parts":["source"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["source","object","o_id"],"attached_condition":"(`zammad_development`.`external_syncs`.`object` = 'User')"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.external_syncs.o_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}}]}},"backtrace":["lib/sequencer/unit/import/ldap/users/lost/ids.rb:24:in `active_ids'","lib/sequencer/unit/import/ldap/users/lost/ids.rb:12:in `process'","lib/sequencer/unit/base.rb:202:in `process'","lib/sequencer.rb:77:in `block (4 levels) in process'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","lib/sequencer.rb:76:in `block (3 levels) in process'","lib/sequencer/state.rb:150:in `process'","lib/sequencer.rb:74:in `block (2 levels) in process'"]},{"sql":"SELECT `users`.* FROM `users` WHERE 1=0 ORDER BY `users`.`id` ASC LIMIT 1000","table":"users","md5":"c4cbe1d534597e43f7754118c77ad61f","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/sequencer/unit/import/ldap/users/lost/deactivate.rb:16:in `process'","lib/sequencer/unit/base.rb:202:in `process'","lib/sequencer.rb:77:in `block (4 levels) in process'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","lib/sequencer.rb:76:in `block (3 levels) in process'","lib/sequencer/state.rb:150:in `process'","lib/sequencer.rb:74:in `block (2 levels) in process'","lib/sequencer/units.rb:29:in `block in each'"]},{"sql":"SELECT COUNT(DISTINCT `roles`.`id`) FROM `roles` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions_roles` `roles_permissions_roles_join` ON `roles_permissions_roles_join`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `roles_permissions_roles_join`.`permission_id` WHERE (roles.id = 1 AND permissions_roles.permission_id IN (1,1,2) AND permissions.active = 1)","table":"roles","md5":"6d2b563bd572b9f232c98e62019d9fc8","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"access_type_ref","table_size":null,"table":"roles_permissions_roles_join","cost":2.5e-07,"rows_read":1,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"roles_permissions_roles_join","cost":1.0e-06,"rows_read":4,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.0e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.72"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":3,"rows_produced_per_join":0,"filtered":"16.67","cost_info":{"read_cost":"0.50","eval_cost":"0.05","prefix_cost":"0.80","data_read_per_join":"8"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` in (1,1,2))"}},{"table":{"table_name":"roles_permissions_roles_join","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.15","prefix_cost":"1.20","data_read_per_join":"24"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`roles_permissions_roles_join`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_permissions_roles_join.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"10.00","cost_info":{"read_cost":"0.38","eval_cost":"0.02","prefix_cost":"1.73","data_read_per_join":"4K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}}]}},"backtrace":["app/models/role.rb:140:in `with_permission?'","app/models/user.rb:1103:in `last_admin_check_by_role'","gems/activerecord-5.1.6.1/lib/active_record/associations/builder/collection_association.rb:39:in `block (2 levels) in define_callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:464:in `block in callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `each'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:392:in `block in remove_records'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:392:in `each'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`login` = 'nicole.braun'","table":"users","md5":"9d683f9c76b5c959a13563f0f4aff2bc","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/sequencer/unit/import/ldap/user/lookup/attributes.rb:14:in `lookup'","lib/sequencer/unit/import/common/model/lookup/attributes.rb:42:in `block in existing_instance'","lib/sequencer/unit/import/common/model/lookup/attributes.rb:37:in `each'","lib/sequencer/unit/import/common/model/lookup/attributes.rb:37:in `find'","lib/sequencer/unit/import/common/model/lookup/attributes.rb:37:in `existing_instance'","lib/sequencer/unit/import/common/model/lookup/attributes.rb:18:in `process'","lib/sequencer/unit/import/common/model/mixin/skip/action.rb:47:in `process'","lib/sequencer/unit.rb:47:in `block in process'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` IN (66, 67) ORDER BY `users`.`id` ASC LIMIT 1000","table":"users","md5":"bcbb705f0d7da03d7e2e9c7c40028e36","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"92K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`id` in (66,67))"}}}},"backtrace":["lib/sequencer/unit/import/ldap/users/lost/deactivate.rb:16:in `process'","lib/sequencer/unit.rb:47:in `block in process'","lib/sequencer/state.rb:150:in `process'","lib/sequencer/unit.rb:46:in `process'","lib/sequencer/unit.rb:18:in `process'","spec/support/sequencer.rb:4:in `process'","spec/lib/sequencer/unit/import/ldap/users/lost/deactivate_spec.rb:11:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'"]},{"sql":"SELECT 1 AS one FROM `groups_users` WHERE `groups_users`.`user_id` IS NULL AND `groups_users`.`group_id` = 1 AND (`groups_users`.`access` != 'full') LIMIT 1","table":"groups_users","md5":"c90b04941da4c1685128449eaf0b1642","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT 1 AS one FROM `groups_users` WHERE `groups_users`.`user_id` = 90 AND `groups_users`.`group_id` = 1 AND (`groups_users`.`access` != 'full') LIMIT 1","table":"groups_users","md5":"b558fd77ef77be0dd1e012f0320fb739","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"((`zammad_development`.`groups_users`.`group_id` = 1) and (`zammad_development`.`groups_users`.`access` <> 'full'))"}}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `permissions`.`name`, `permissions`.`preferences` FROM `permissions` INNER JOIN `permissions_roles` ON `permissions_roles`.`permission_id` = `permissions`.`id` INNER JOIN `roles` ON `roles`.`id` = `permissions_roles`.`role_id` WHERE (roles.id IN (2) AND permissions.active = 1)","table":"permissions","md5":"3a17eafd78494fa7439fa0b6006fd623","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"permissions_roles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":300,"cost":0.00011718750000000001}],"cost":0.0001186875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.30"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.40","prefix_cost":"0.90","data_read_per_join":"64"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"10.00","cost_info":{"read_cost":"1.00","eval_cost":"0.04","prefix_cost":"2.30","data_read_per_join":"12K"},"used_columns":["id","name","preferences","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}}]}},"backtrace":["app/models/user.rb:418:in `permissions'","app/models/user.rb:484:in `permissions_with_child_ids'","app/models/activity_stream.rb:112:in `list'","app/models/user.rb:245:in `activity_stream'","lib/sessions/backend/activity_stream.rb:17:in `load'","spec/lib/sessions/backend/activity_stream_spec.rb:21:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'"]},{"sql":"SELECT `permissions`.`id` FROM `permissions` WHERE (permissions.active = 1 AND (permissions.name = 'user_preferences' OR permissions.name LIKE 'user_preferences.%' OR permissions.name = 'ticket.agent' OR permissions.name LIKE 'ticket.agent.%' OR permissions.name = 'chat.agent' OR permissions.name LIKE 'chat.agent.%' OR permissions.name = 'cti.agent' OR permissions.name LIKE 'cti.agent.%'))","table":"permissions","md5":"8b0c598986242d72ad23fbc42bcc3f61","messages":[{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"8.96"},"table":{"table_name":"permissions","access_type":"range","possible_keys":["index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":16,"rows_produced_per_join":1,"filtered":"10.00","index_condition":"((`zammad_development`.`permissions`.`name` = 'user_preferences') or (`zammad_development`.`permissions`.`name` like 'user_preferences.%') or (`zammad_development`.`permissions`.`name` = 'ticket.agent') or (`zammad_development`.`permissions`.`name` like 'ticket.agent.%') or (`zammad_development`.`permissions`.`name` = 'chat.agent') or (`zammad_development`.`permissions`.`name` like 'chat.agent.%') or (`zammad_development`.`permissions`.`name` = 'cti.agent') or (`zammad_development`.`permissions`.`name` like 'cti.agent.%'))","cost_info":{"read_cost":"8.80","eval_cost":"0.16","prefix_cost":"8.96","data_read_per_join":"50K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}}},"backtrace":["app/models/user.rb:492:in `permissions_with_child_ids'","app/models/activity_stream.rb:112:in `list'","app/models/user.rb:245:in `activity_stream'","lib/sessions/backend/activity_stream.rb:17:in `load'","spec/lib/sessions/backend/activity_stream_spec.rb:21:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT `groups_users`.`group_id` FROM `groups_users` LEFT OUTER JOIN `groups` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 90 AND `groups_users`.`access` IN ('read', 'full') AND `groups`.`active` = 1","table":"groups_users","md5":"09b9ae983821029f4d7bcce1f3fb1abd","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":1,"table":"groups","join_to":"groups_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`access` in ('read','full'))"}},{"table":{"table_name":"groups","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.groups_users.group_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:111:in `group_ids_access'","app/models/activity_stream.rb:113:in `list'","app/models/user.rb:245:in `activity_stream'","lib/sessions/backend/activity_stream.rb:17:in `load'","spec/lib/sessions/backend/activity_stream_spec.rb:21:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT `roles_groups`.`group_id` FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` = 2 AND `roles_groups`.`access` IN ('read', 'full') AND `groups`.`active` = 1","table":"roles_groups","md5":"a0683454bd7d3f549b73f6b4c9c98684","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":1,"table":"groups","join_to":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`access` in ('read','full'))"}},{"table":{"table_name":"groups","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_groups.group_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:117:in `group_ids_access'","app/models/activity_stream.rb:113:in `list'","app/models/user.rb:245:in `activity_stream'","lib/sessions/backend/activity_stream.rb:17:in `load'","spec/lib/sessions/backend/activity_stream_spec.rb:21:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT `activity_streams`.* FROM `activity_streams` WHERE ((permission_id IN (50,52,47,35,38,42,43,41,39,40,37,44,36) AND group_id is NULL) OR (permission_id IN (50,52,47,35,38,42,43,41,39,40,37,44,36) AND group_id IN (1)) OR (permission_id is NULL AND group_id IN (1))) ORDER BY created_at DESC, id DESC LIMIT 1","table":"activity_streams","md5":"a7e255f5b4192cafa5565b3169256b3a","messages":[{"tag":"access_type_tablescan","table_size":6,"table":"activity_streams","cost":1.5e-06,"rows_read":6,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.86875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.60"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"activity_streams","access_type":"ALL","possible_keys":["index_activity_streams_on_permission_id","index_activity_streams_on_group_id"],"rows_examined_per_scan":6,"rows_produced_per_join":6,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.60","prefix_cost":"1.60","data_read_per_join":"288"},"used_columns":["id","activity_stream_type_id","activity_stream_object_id","permission_id","group_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`activity_streams`.`permission_id` in (50,52,47,35,38,42,43,41,39,40,37,44,36)) and isnull(`zammad_development`.`activity_streams`.`group_id`)) or ((`zammad_development`.`activity_streams`.`group_id` = 1) and (`zammad_development`.`activity_streams`.`permission_id` in (50,52,47,35,38,42,43,41,39,40,37,44,36))) or ((`zammad_development`.`activity_streams`.`group_id` = 1) and isnull(`zammad_development`.`activity_streams`.`permission_id`)))"}}}},"backtrace":["lib/sessions/backend/activity_stream.rb:18:in `load'","spec/lib/sessions/backend/activity_stream_spec.rb:21:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:72:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:70:in `handle_matcher'"]},{"sql":"SELECT `type_lookups`.* FROM `type_lookups` WHERE `type_lookups`.`id` = 3 LIMIT 1","table":"type_lookups","md5":"073cc2c48fbd399285b2767820414694","messages":[{"tag":"access_type_const","table":"type_lookups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/type_lookup.rb:6:in `by_id'","app/models/activity_stream/assets.rb:36:in `assets'","lib/sessions/backend/activity_stream.rb:35:in `block in load'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/sessions/backend/activity_stream.rb:33:in `load'"]},{"sql":"SELECT `ticket_articles`.id AS `articles`, `ticket_time_accountings`.id AS `ticket_time_accounting` FROM `tickets` LEFT OUTER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` LEFT OUTER JOIN `ticket_time_accountings` ON `ticket_time_accountings`.`ticket_id` = `tickets`.`id` WHERE `tickets`.`id` = 42","table":"tickets","md5":"72515b9251f0c823ccce4fc71ddbaf74","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"access_type_ref","table_size":0,"table":"ticket_time_accountings","cost":2.5e-07,"rows_read":1,"index":"index_ticket_time_accountings_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":3,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":1.0125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id"]}},{"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id"]}},{"table":{"table_name":"ticket_time_accountings","access_type":"ref","possible_keys":["index_ticket_time_accountings_on_ticket_id"],"key":"index_ticket_time_accountings_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"40"},"used_columns":["id","ticket_id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/ticket/assets.rb:33:in `assets'","app/models/application_model/can_assets.rb:151:in `block in assets_of_object_list'","app/models/application_model/can_assets.rb:146:in `each'","app/models/application_model/can_assets.rb:146:in `assets_of_object_list'","app/models/activity_stream/assets.rb:42:in `assets'","lib/sessions/backend/activity_stream.rb:35:in `block in load'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `roles`.id AS `roles`, `organizations`.id AS `organizations`, `tokens`.id AS `tokens`, `authorizations`.id AS `authorizations` FROM `users` LEFT OUTER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` LEFT OUTER JOIN `organizations_users` ON `organizations_users`.`user_id` = `users`.`id` LEFT OUTER JOIN `organizations` ON `organizations`.`id` = `organizations_users`.`organization_id` LEFT OUTER JOIN `tokens` ON `tokens`.`user_id` = `users`.`id` LEFT OUTER JOIN `authorizations` ON `authorizations`.`user_id` = `users`.`id` WHERE `users`.`id` = 1","table":"users","md5":"d8012d9db44b953d18de972678b7e8a4","messages":[{"tag":"access_type_const","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_users","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"organizations_users","cost":2.5e-07,"rows_read":1,"index":"index_organizations_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":1,"table":"organizations","join_to":"organizations_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":0,"table":"tokens","cost":2.5e-07,"rows_read":1,"index":"index_tokens_on_user_id","index_used":["user_id"]},{"tag":"access_type_ref","table_size":0,"table":"authorizations","cost":2.5e-07,"rows_read":1,"index":"index_authorizations_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":5,"result_bytes":80,"cost":3.125e-05}],"cost":3.325e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.10"},"nested_loop":[{"table":{"table_name":"users","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"46K"},"used_columns":["id"]}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"]}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"organizations_users","access_type":"ref","possible_keys":["index_organizations_users_on_user_id"],"key":"index_organizations_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"1.05","data_read_per_join":"16"},"used_columns":["user_id","organization_id"]}},{"table":{"table_name":"organizations","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.organizations_users.organization_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"1.40","data_read_per_join":"15K"},"used_columns":["id"]}},{"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_user_id"],"key":"index_tokens_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"1.75","data_read_per_join":"1K"},"used_columns":["id","user_id"]}},{"table":{"table_name":"authorizations","access_type":"ref","possible_keys":["index_authorizations_on_user_id"],"key":"index_authorizations_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"2.10","data_read_per_join":"10K"},"used_columns":["id","user_id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/user/assets.rb:33:in `assets'","app/models/ticket/assets.rb:42:in `block in assets'","app/models/ticket/assets.rb:35:in `each'","app/models/ticket/assets.rb:35:in `assets'","app/models/application_model/can_assets.rb:151:in `block in assets_of_object_list'","app/models/application_model/can_assets.rb:146:in `each'","app/models/application_model/can_assets.rb:146:in `assets_of_object_list'"]},{"sql":"SELECT `authorizations`.* FROM `authorizations` WHERE `authorizations`.`user_id` = 1","table":"authorizations","md5":"8a8e7cc56ba9829edb309dac0e1552fc","messages":[{"tag":"access_type_ref","table_size":0,"table":"authorizations","cost":2.5e-07,"rows_read":1,"index":"index_authorizations_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"ref","possible_keys":["index_authorizations_on_user_id"],"key":"index_authorizations_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["id","provider","uid","token","secret","username","user_id","created_at","updated_at"]}}},"backtrace":["app/models/user/assets.rb:49:in `assets'","app/models/ticket/assets.rb:42:in `block in assets'","app/models/ticket/assets.rb:35:in `each'","app/models/ticket/assets.rb:35:in `assets'","app/models/application_model/can_assets.rb:151:in `block in assets_of_object_list'","app/models/application_model/can_assets.rb:146:in `each'","app/models/application_model/can_assets.rb:146:in `assets_of_object_list'","app/models/activity_stream/assets.rb:42:in `assets'"]},{"sql":"SELECT `permissions`.id AS `permissions` FROM `roles` LEFT OUTER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` LEFT OUTER JOIN `permissions` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `roles`.`id` = 3","table":"roles","md5":"c4285b01c77625171cd7ad84737feb1f","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"permissions_roles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":6.1875000000000005e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.75"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":5,"rows_produced_per_join":5,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.50","prefix_cost":"1.00","data_read_per_join":"80"},"used_columns":["role_id","permission_id"]}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":5,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.25","eval_cost":"0.50","prefix_cost":"2.75","data_read_per_join":"157K"},"used_columns":["id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/role/assets.rb:33:in `assets'","app/models/user/assets.rb:66:in `block in assets'","app/models/user/assets.rb:60:in `each'","app/models/user/assets.rb:60:in `assets'","app/models/ticket/assets.rb:42:in `block in assets'","app/models/ticket/assets.rb:35:in `each'","app/models/ticket/assets.rb:35:in `assets'"]},{"sql":"SELECT `groups`.`id`, `access` FROM `groups` INNER JOIN `roles_groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` = 3 AND `groups`.`active` = 1","table":"groups","md5":"1510cd12feb4349cfb7fc318423e43db","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":3.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}},{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`group_id` = `zammad_development`.`groups`.`id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:211:in `groups_access_map'","app/models/concerns/has_groups.rb:173:in `group_ids_access_map'","app/models/application_model/can_associations.rb:156:in `attributes_with_association_ids'","app/models/role/assets.rb:33:in `assets'","app/models/user/assets.rb:66:in `block in assets'","app/models/user/assets.rb:60:in `each'","app/models/user/assets.rb:60:in `assets'","app/models/ticket/assets.rb:42:in `block in assets'"]},{"sql":"SELECT `groups_users`.`group_id` FROM `groups_users` LEFT OUTER JOIN `groups` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 91 AND `groups_users`.`access` = 'full' AND `groups`.`active` = 1","table":"groups_users","md5":"ae41a156bc913116f7a1db8e7d51b3e1","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":1,"table":"groups","join_to":"groups_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`access` = 'full')"}},{"table":{"table_name":"groups","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.groups_users.group_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:111:in `group_ids_access'","lib/stats/ticket_waiting_time.rb:8:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `roles_groups`.`group_id` FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` = 2 AND `roles_groups`.`access` = 'full' AND `groups`.`active` = 1","table":"roles_groups","md5":"517a026f656f995409a1dd85c6918c6d","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":1,"table":"groups","join_to":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`access` = 'full')"}},{"table":{"table_name":"groups","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_groups.group_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:117:in `group_ids_access'","lib/stats/ticket_waiting_time.rb:8:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `tickets`.`id`, `tickets`.`owner_id` FROM `tickets` WHERE (group_id IN (NULL) AND updated_at > '2019-02-25') LIMIT 20000","table":"tickets","md5":"e7a0224b9440ba7b74437e82ad2095f5","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/stats/ticket_waiting_time.rb:12:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT `ticket_articles`.`created_at`, `ticket_articles`.`sender_id`, `ticket_articles`.`ticket_id`, `ticket_articles`.`id` FROM `ticket_articles` INNER JOIN `ticket_article_types` ON `ticket_article_types`.`id` = `ticket_articles`.`type_id` INNER JOIN `ticket_article_senders` ON `ticket_article_senders`.`id` = `ticket_articles`.`sender_id` WHERE (ticket_articles.ticket_id IN (NULL) AND ticket_articles.created_at > '2019-02-25' AND ticket_articles.internal = 0 AND ticket_article_types.communication = 1) ORDER BY `ticket_articles`.`ticket_id` ASC, `ticket_articles`.`created_at` ASC","table":"ticket_articles","md5":"6502fa14f08606bce6e935de9147ed34","messages":[{"tag":"access_type_const","table":"ticket_articles"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/stats/ticket_waiting_time.rb:62:in `calculate_average'","lib/stats/ticket_waiting_time.rb:19:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (owner_id = 91 AND group_id IN (NULL) AND state_id IN (1,2,7,3) AND escalation_at < '2019-02-25 16:07:34.785349')","table":"tickets","md5":"f09c27b4408daa2cd95dc25430b4bb83","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/stats/ticket_escalation.rb:15:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (group_id IN (NULL) AND state_id IN (1,2,7,3) AND escalation_at < '2019-02-25 16:07:34.789116')","table":"tickets","md5":"2dd0e6b29cfd4e8b2fd52f86fab356f1","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/stats/ticket_escalation.rb:20:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT `ticket_article_types`.* FROM `ticket_article_types`","table":"ticket_article_types","md5":"b52f9c545835e82b6644d279157713d0","messages":[{"tag":"access_type_tablescan","table_size":12,"table":"ticket_article_types","cost":3.0e-06,"rows_read":12,"index":null,"index_used":null},{"tag":"retsize","result_size":12,"result_bytes":480,"cost":0.0001875}],"cost":0.0001905,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.45"},"table":{"table_name":"ticket_article_types","access_type":"ALL","rows_examined_per_scan":12,"rows_produced_per_join":12,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"1.20","prefix_cost":"1.45","data_read_per_join":"18K"},"used_columns":["id","name","note","communication","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/stats/ticket_channel_distribution.rb:42:in `block in generate'","lib/stats/ticket_channel_distribution.rb:37:in `each'","lib/stats/ticket_channel_distribution.rb:37:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT COUNT(*) FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE 1=0 AND `ticket_articles`.`sender_id` = 2 AND `ticket_articles`.`type_id` = 1 AND (ticket_articles.created_at > '2019-02-18 16:07:34.830922')","table":"tickets","md5":"5ace7a2fb69d479e3f9c9d8151612d27","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/stats/ticket_channel_distribution.rb:53:in `block in generate'","lib/stats/ticket_channel_distribution.rb:37:in `each'","lib/stats/ticket_channel_distribution.rb:37:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT COUNT(*) FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE 1=0 AND `ticket_articles`.`sender_id` = 2 AND `ticket_articles`.`type_id` IN (6, 7) AND (ticket_articles.created_at > '2019-02-18 16:07:34.883198')","table":"tickets","md5":"1f43ee9170fd93daf05968dc0a89cae6","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/stats/ticket_channel_distribution.rb:53:in `block in generate'","lib/stats/ticket_channel_distribution.rb:37:in `each'","lib/stats/ticket_channel_distribution.rb:37:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE `tickets`.`owner_id` = 91 AND `tickets`.`state_id` IN (1, 2, 7, 3)","table":"tickets","md5":"9ee3a26b49abae6cfed8f38fa0fa8dbe","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_owner_id","index_used":["owner_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_owner_id"],"key":"index_tickets_on_owner_id","used_key_parts":["owner_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["state_id","owner_id"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` in (1,2,7,3))"}}},"backtrace":["lib/stats/ticket_load_measure.rb:10:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE 1=0 AND `tickets`.`state_id` IN (1, 2, 7, 3)","table":"tickets","md5":"b734aeb4d7c01b78395d08838ec6d43a","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["lib/stats/ticket_load_measure.rb:13:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` WHERE (owner_id = 91 AND (state_id IN (1,2) OR (state_id IN (3) AND pending_time < '2019-02-25 16:07:34.966019'))) LIMIT 1000","table":"tickets","md5":"00798f36a11e918b297a7c6db93cd41f","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_owner_id","index_used":["owner_id"]},{"tag":"retsize","result_size":3,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":5.4375e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_owner_id","index_tickets_on_pending_time"],"key":"index_tickets_on_owner_id","used_key_parts":["owner_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","state_id","owner_id","pending_time"],"attached_condition":"((`zammad_development`.`tickets`.`state_id` in (1,2)) or ((`zammad_development`.`tickets`.`state_id` = 3) and (`zammad_development`.`tickets`.`pending_time` < '2019-02-25 16:07:34.966019')))"}}},"backtrace":["lib/stats/ticket_in_process.rb:13:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` FORCE INDEX(`index_tickets_on_close_at`) WHERE (owner_id = 91 AND state_id IN (4) AND close_at > '2019-02-24 16:07:34.976970') LIMIT 100","table":"tickets","md5":"0f51bb0ae1ea9f0f5fd3ca8b1c5f3e57","messages":[{"tag":"access_type_range","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_close_at","index_used":["close_at"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.80"},"table":{"table_name":"tickets","access_type":"range","possible_keys":["index_tickets_on_close_at"],"key":"index_tickets_on_close_at","used_key_parts":["close_at"],"key_length":"7","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`close_at` > '2019-02-24 16:07:34.976970')","cost_info":{"read_cost":"1.70","eval_cost":"0.10","prefix_cost":"1.80","data_read_per_join":"2K"},"used_columns":["id","state_id","owner_id","close_at"],"attached_condition":"((`zammad_development`.`tickets`.`state_id` = 4) and (`zammad_development`.`tickets`.`owner_id` = 91))"}}},"backtrace":["lib/stats/ticket_in_process.rb:20:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` FORCE INDEX(`index_tickets_on_owner_id`) WHERE (owner_id = 91 AND state_id IN (7) AND updated_at > '2019-02-24 16:07:34.982830') LIMIT 100","table":"tickets","md5":"5d4ea90d4a7459456a0d9d32acc5d45f","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_owner_id","index_used":["owner_id"]},{"tag":"retsize","result_size":3,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":5.4375e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_owner_id"],"key":"index_tickets_on_owner_id","used_key_parts":["owner_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.80","eval_cost":"0.03","prefix_cost":"0.90","data_read_per_join":"719"},"used_columns":["id","state_id","owner_id","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`state_id` = 7) and (`zammad_development`.`tickets`.`updated_at` > '2019-02-24 16:07:34.982830'))"}}},"backtrace":["lib/stats/ticket_in_process.rb:27:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT COUNT(DISTINCT(o_id)) FROM `histories` WHERE (histories.created_at >= '2019-02-24 16:07:34.995128' AND histories.history_object_id = 4 AND histories.created_by_id = 91 AND histories.o_id IN (NULL))","table":"histories","md5":"67bad10e3b1be0240384ec5a47addb41","messages":[{"tag":"access_type_const","table":"histories"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/stats/ticket_in_process.rb:35:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT COUNT(`tickets`.`id`) FROM `tickets` WHERE (owner_id = 91 AND close_at > '2019-02-18 16:07:35.005011')","table":"tickets","md5":"f43b5b93cce926bce1f2ff77689839e5","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_owner_id","index_used":["owner_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_owner_id","index_tickets_on_close_at"],"key":"index_tickets_on_owner_id","used_key_parts":["owner_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.00","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"108"},"used_columns":["id","owner_id","close_at"],"attached_condition":"(`zammad_development`.`tickets`.`close_at` > '2019-02-18 16:07:35.005011')"}}},"backtrace":["lib/stats/ticket_reopen.rb:11:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:22:in `generate'"]},{"sql":"SELECT COUNT(*) FROM `stats_stores` WHERE `stats_stores`.`stats_store_object_id` = 1 AND `stats_stores`.`o_id` = 91 AND `stats_stores`.`key` = 'ticket:reopen' AND (created_at > '2019-02-18 16:07:35.009855' AND created_at < '2019-02-25 16:07:35.010105')","table":"stats_stores","md5":"75fa5bda26857a99dd5f0caa4791ac1b","messages":[{"tag":"access_type_ref","table_size":0,"table":"stats_stores","cost":2.5e-07,"rows_read":1,"index":"index_stats_stores_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stats_stores","access_type":"ref","possible_keys":["index_stats_stores_on_o_id","index_stats_stores_on_key","index_stats_stores_on_stats_store_object_id","index_stats_stores_on_created_at"],"key":"index_stats_stores_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["stats_store_object_id","o_id","key","created_at"],"attached_condition":"((`zammad_development`.`stats_stores`.`stats_store_object_id` = 1) and (`zammad_development`.`stats_stores`.`key` = 'ticket:reopen') and (`zammad_development`.`stats_stores`.`created_at` > '2019-02-18 16:07:35.009855') and (`zammad_development`.`stats_stores`.`created_at` < '2019-02-25 16:07:35.010105'))"}}},"backtrace":["app/models/stats_store.rb:34:in `count_by_search'","lib/stats/ticket_reopen.rb:14:in `generate'","lib/stats.rb:46:in `block (2 levels) in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","lib/stats.rb:34:in `block in generate'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `stats_stores`.* FROM `stats_stores` WHERE `stats_stores`.`o_id` = 91 AND `stats_stores`.`key` = 'dashboard' AND `stats_stores`.`stats_store_object_id` = 1 LIMIT 1","table":"stats_stores","md5":"9077fc873cc427b6a89f971a93886eb3","messages":[{"tag":"access_type_ref","table_size":0,"table":"stats_stores","cost":2.5e-07,"rows_read":1,"index":"index_stats_stores_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":1,"result_bytes":40,"cost":1.5625e-05}],"cost":1.5875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stats_stores","access_type":"ref","possible_keys":["index_stats_stores_on_o_id","index_stats_stores_on_key","index_stats_stores_on_stats_store_object_id"],"key":"index_stats_stores_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","stats_store_object_id","o_id","key","related_o_id","related_stats_store_object_id","data","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`stats_stores`.`stats_store_object_id` = 1) and (`zammad_development`.`stats_stores`.`key` = 'dashboard'))"}}},"backtrace":["app/models/stats_store.rb:55:in `search'","app/models/stats_store.rb:74:in `sync'","lib/stats.rb:83:in `block in generate'","lib/stats.rb:78:in `each'","lib/stats.rb:78:in `generate'","spec/lib/stats_spec.rb:13:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'"]},{"sql":"SELECT `calendars`.* FROM `calendars` ORDER BY `calendars`.`created_at` ASC, `calendars`.`id` ASC LIMIT 1","table":"calendars","md5":"a986e8d7b1687630310e6e3afe3c9749","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":10757,"cost":0.004201953125}],"cost":0.004202203125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.60"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"calendars","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/calendar.rb:287:in `min_one_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_update_callbacks'"]},{"sql":"SELECT `email_addresses`.* FROM `email_addresses` WHERE `email_addresses`.`email` = 'santos@bechtelar.biz' LIMIT 1","table":"email_addresses","md5":"91c03dcfd991a4a06ea919912a0cd0f8","messages":[{"tag":"access_type_const","table":"email_addresses"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/channel/filter/sender_is_system_address.rb:22:in `block in run'","app/models/channel/filter/sender_is_system_address.rb:21:in `each'","app/models/channel/filter/sender_is_system_address.rb:21:in `run'","app/models/channel/email_parser.rb:148:in `block in _process'","app/models/channel/email_parser.rb:145:in `each'","app/models/channel/email_parser.rb:145:in `_process'","app/models/channel/email_parser.rb:111:in `block in process'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'"]},{"sql":"SELECT `users`.* FROM `users` WHERE (email = 'santos@bechtelar.biz' OR login = 'santos@bechtelar.biz') LIMIT 1","table":"users","md5":"1ba30f239369a1fa9ec86c3e1b4f679d","messages":[{"tag":"access_type_tablescan","table_size":100000,"table":"users","cost":0.024999999999999998,"rows_read":100000,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.025391015625,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.46"},"table":{"table_name":"users","access_type":"ALL","possible_keys":["index_users_on_login","index_users_on_email"],"rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"43.75","cost_info":{"read_cost":"1.26","eval_cost":"0.20","prefix_cost":"1.46","data_read_per_join":"92K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`users`.`email` = 'santos@bechtelar.biz') or (`zammad_development`.`users`.`login` = 'santos@bechtelar.biz'))"}}},"backtrace":["app/models/channel/filter/identify_sender.rb:153:in `user_create'","app/models/channel/filter/identify_sender.rb:56:in `run'","app/models/channel/email_parser.rb:148:in `block in _process'","app/models/channel/email_parser.rb:145:in `each'","app/models/channel/email_parser.rb:145:in `_process'","app/models/channel/email_parser.rb:111:in `block in process'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'"]},{"sql":"SELECT `postmaster_filters`.* FROM `postmaster_filters` WHERE `postmaster_filters`.`active` = 1 AND `postmaster_filters`.`channel` = 'email' ORDER BY `postmaster_filters`.`name` ASC, `postmaster_filters`.`created_at` ASC","table":"postmaster_filters","md5":"5d5c095bb50a74ff83bd1bffd94bae79","messages":[{"tag":"access_type_ref","table_size":0,"table":"postmaster_filters","cost":2.5e-07,"rows_read":1,"index":"index_postmaster_filters_on_channel","index_used":["channel"]},{"tag":"retsize","result_size":1,"result_bytes":29,"cost":1.1328125000000001e-05}],"cost":1.1578125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"postmaster_filters","access_type":"ref","possible_keys":["index_postmaster_filters_on_channel"],"key":"index_postmaster_filters_on_channel","used_key_parts":["channel"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`postmaster_filters`.`channel` <=> 'email')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","name","channel","match","perform","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`postmaster_filters`.`active` = 1)"}}}},"backtrace":["app/models/channel/filter/database.rb:10:in `run'","app/models/channel/email_parser.rb:148:in `block in _process'","app/models/channel/email_parser.rb:145:in `each'","app/models/channel/email_parser.rb:145:in `_process'","app/models/channel/email_parser.rb:111:in `block in process'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:33:in `catch'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`active` = 1 ORDER BY id ASC LIMIT 1","table":"groups","md5":"94fb62bad2267dcab2de4a95685ac6f3","messages":[{"tag":"access_type_index","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":82,"cost":3.203125e-05}],"cost":3.228125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"groups","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}}}},"backtrace":["app/models/channel/email_parser.rb:230:in `block in _process'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'"]},{"sql":"SELECT `store_files`.* FROM `store_files` WHERE `store_files`.`sha` = '0d74653e258d63a979b5853a76558e28ce154423324f7bdcea1890dbb5112890' LIMIT 1","table":"store_files","md5":"44e59731d5a876cb0d18c4ac3dbf3f53","messages":[{"tag":"access_type_const","table":"store_files"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/store/file.rb:23:in `add'","app/models/store.rb:44:in `add'","app/models/ticket/article.rb:294:in `save_as_raw'","app/models/channel/email_parser.rb:282:in `block (2 levels) in _process'","gems/activerecord-5.1.6.1/lib/active_record/locking/pessimistic.rb:81:in `block in with_lock'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:299:in `transaction'"]},{"sql":"SELECT `store_provider_dbs`.* FROM `store_provider_dbs` WHERE `store_provider_dbs`.`sha` = '0d74653e258d63a979b5853a76558e28ce154423324f7bdcea1890dbb5112890' LIMIT 1","table":"store_provider_dbs","md5":"bc7c0750281af161f494dd32c960e970","messages":[{"tag":"access_type_const","table":"store_provider_dbs"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/store/file.rb:41:in `add'","app/models/store.rb:44:in `add'","app/models/ticket/article.rb:294:in `save_as_raw'","app/models/channel/email_parser.rb:282:in `block (2 levels) in _process'","gems/activerecord-5.1.6.1/lib/active_record/locking/pessimistic.rb:81:in `block in with_lock'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:299:in `transaction'"]},{"sql":"SELECT `store_files`.* FROM `store_files` WHERE `store_files`.`id` = 20 LIMIT 1","table":"store_files","md5":"e99e470fa0e6936aac8a4d0f5f2692e3","messages":[{"tag":"access_type_const","table":"store_files"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/store.rb:188:in `content'","spec/models/channel/email_parser_spec.rb:191:in `block (5 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 59","table":"ticket_articles","md5":"0ef3c2592d54511708a377145cdec154","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.837500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:308:in `block in merge_to'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'"]},{"sql":"SELECT `link_types`.* FROM `link_types` WHERE `link_types`.`name` = 'parent' LIMIT 1","table":"link_types","md5":"aee9990643dc9f6465635e939542d2be","messages":[{"tag":"access_type_const","table":"link_types"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/link.rb:200:in `link_type_get'","app/models/link.rb:82:in `add'","app/models/ticket.rb:351:in `block in merge_to'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'"]},{"sql":"SELECT `links`.* FROM `links` WHERE (link_object_source_id = 1 AND link_object_source_value = 59)","table":"links","md5":"4ffc60a7e5df6ef59b915c69486a2ed4","messages":[{"tag":"access_type_ref","table_size":0,"table":"links","cost":2.5e-07,"rows_read":1,"index":"links_uniq_total","index_used":["link_object_source_id","link_object_source_value"]},{"tag":"retsize","result_size":1,"result_bytes":40,"cost":1.5625e-05}],"cost":1.5875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"links","access_type":"ref","possible_keys":["links_uniq_total"],"key":"links_uniq_total","used_key_parts":["link_object_source_id","link_object_source_value"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","link_type_id","link_object_source_id","link_object_source_value","link_object_target_id","link_object_target_value","created_at","updated_at"]}}},"backtrace":["app/models/link.rb:36:in `list'","app/models/channel/filter/follow_up_merged.rb:20:in `find_merge_follow_up_ticket'","app/models/channel/filter/follow_up_merged.rb:11:in `run'","spec/support/channel_filter.rb:14:in `filter'","spec/models/channel/filter/follow_up_merged_spec.rb:17:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT `links`.* FROM `links` WHERE (link_object_target_id = 1 AND link_object_target_value = 59)","table":"links","md5":"3bdf7ac248ba665f3e53ce2693370aee","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"links","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"links","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","link_type_id","link_object_source_id","link_object_source_value","link_object_target_id","link_object_target_value","created_at","updated_at"],"attached_condition":"((`zammad_development`.`links`.`link_object_target_value` = 59) and (`zammad_development`.`links`.`link_object_target_id` = 1))"}}},"backtrace":["app/models/link.rb:48:in `list'","app/models/channel/filter/follow_up_merged.rb:20:in `find_merge_follow_up_ticket'","app/models/channel/filter/follow_up_merged.rb:11:in `run'","spec/support/channel_filter.rb:14:in `filter'","spec/models/channel/filter/follow_up_merged_spec.rb:17:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`area` = 'Twitter::Account'","table":"channels","md5":"06154355606e37bcd388d611162f72c2","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"index_channels_on_area","index_used":["area"]},{"tag":"retsize","result_size":2,"result_bytes":680,"cost":0.000265625}],"cost":0.00026612500000000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["index_channels_on_area"],"key":"index_channels_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"6K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/twitter_sync.rb:650:in `locale_sender?'","app/models/channel/driver/twitter.rb:188:in `block (2 levels) in fetch_search'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:9:in `block in each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","app/models/channel/driver/twitter.rb:176:in `collect'","app/models/channel/driver/twitter.rb:176:in `block in fetch_search'","app/models/channel/driver/twitter.rb:167:in `each'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`message_id` = '1069265077583400960' LIMIT 1","table":"ticket_articles","md5":"6ec45eedda366d554ae735086d47b047","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.8875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"ticket_articles","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`ticket_articles`.`message_id` = '1069265077583400960')"}}},"backtrace":["app/models/channel/driver/twitter.rb:189:in `block (2 levels) in fetch_search'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:9:in `block in each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","app/models/channel/driver/twitter.rb:176:in `collect'","app/models/channel/driver/twitter.rb:176:in `block in fetch_search'","app/models/channel/driver/twitter.rb:167:in `each'","app/models/channel/driver/twitter.rb:167:in `fetch_search'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE (created_at > '2019-02-25 15:54:07.780368' AND type_id = 6)","table":"ticket_articles","md5":"373a797717642a8315b64227feebfc2c","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"index_ticket_articles_on_type_id","index_used":["type_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_created_at","index_ticket_articles_on_type_id"],"key":"index_ticket_articles_on_type_id","used_key_parts":["type_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"21K"},"used_columns":["type_id","created_at"],"attached_condition":"(`zammad_development`.`ticket_articles`.`created_at` > '2019-02-25 15:54:07.780368')"}}},"backtrace":["lib/twitter_sync.rb:538:in `tweet_limit_reached'","app/models/channel/driver/twitter.rb:190:in `block (2 levels) in fetch_search'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:9:in `block in each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","bundler/gems/twitter-844818cad07c/lib/twitter/enumerable.rb:8:in `each'","app/models/channel/driver/twitter.rb:176:in `collect'","app/models/channel/driver/twitter.rb:176:in `block in fetch_search'","app/models/channel/driver/twitter.rb:167:in `each'"]},{"sql":"SELECT `authorizations`.* FROM `authorizations` WHERE `authorizations`.`uid` = '2694949692' AND `authorizations`.`provider` = 'twitter' LIMIT 1","table":"authorizations","md5":"6350ae1bd113e7bdfc9ff30a7339f97f","messages":[{"tag":"access_type_ref","table_size":0,"table":"authorizations","cost":2.5e-07,"rows_read":1,"index":"index_authorizations_on_uid_and_provider","index_used":["uid","provider"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"ref","possible_keys":["index_authorizations_on_uid_and_provider"],"key":"index_authorizations_on_uid_and_provider","used_key_parts":["uid","provider"],"key_length":"1504","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["id","provider","uid","token","secret","username","user_id","created_at","updated_at"]}}},"backtrace":["lib/twitter_sync.rb:41:in `to_user'","lib/twitter_sync.rb:423:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `avatars`.* FROM `avatars` WHERE `avatars`.`object_lookup_id` = 1 AND `avatars`.`o_id` = 182 ORDER BY created_at ASC, id DESC","table":"avatars","md5":"72dff8eb49455a7d6fbe669134328d39","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":2.5e-07,"rows_read":1,"index":"index_avatars_on_o_id_and_object_lookup_id","index_used":["o_id","object_lookup_id"]},{"tag":"retsize","result_size":1,"result_bytes":97,"cost":3.7890625e-05}],"cost":3.8140625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"avatars","access_type":"ref","possible_keys":["index_avatars_on_o_id_and_object_lookup_id"],"key":"index_avatars_on_o_id_and_object_lookup_id","used_key_parts":["o_id","object_lookup_id"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"((`zammad_development`.`avatars`.`o_id` <=> 182) and (`zammad_development`.`avatars`.`object_lookup_id` <=> 1))","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","o_id","object_lookup_id","default","deletable","initial","store_full_id","store_resize_id","store_hash","source","source_url","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/avatar.rb:392:in `set_default_items'","app/models/avatar.rb:238:in `add'","lib/twitter_sync.rb:78:in `to_user'","lib/twitter_sync.rb:423:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT 1 AS one FROM `authorizations` WHERE `authorizations`.`uid` = BINARY '2694949692' AND `authorizations`.`provider` = 'twitter' LIMIT 1","table":"authorizations","md5":"e8ec75b4cf387b8a5b87ee51dd6e04c0","messages":[{"tag":"limited_scan","cost":0.0,"table":"authorizations","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"index","possible_keys":["index_authorizations_on_uid_and_provider"],"key":"index_authorizations_on_uid_and_provider","used_key_parts":["uid","provider"],"key_length":"1504","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["provider","uid"],"attached_condition":"((`zammad_development`.`authorizations`.`uid` = '2694949692') and (`zammad_development`.`authorizations`.`provider` = 'twitter'))"}}},"backtrace":["lib/twitter_sync.rb:105:in `to_user'","lib/twitter_sync.rb:423:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT 1 AS one FROM `authorizations` WHERE `authorizations`.`uid` = BINARY '2694949692' AND (`authorizations`.`id` != 1) AND `authorizations`.`provider` = 'twitter' LIMIT 1","table":"authorizations","md5":"6d007fa23a92e8add8fa19ddd74273a6","messages":[{"tag":"limited_scan","cost":0.0,"table":"authorizations","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"index","possible_keys":["PRIMARY","index_authorizations_on_uid_and_provider"],"key":"index_authorizations_on_uid_and_provider","used_key_parts":["uid","provider"],"key_length":"1504","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["id","provider","uid"],"attached_condition":"((`zammad_development`.`authorizations`.`uid` = '2694949692') and (`zammad_development`.`authorizations`.`id` <> 1) and (`zammad_development`.`authorizations`.`provider` = 'twitter'))"}}},"backtrace":["lib/twitter_sync.rb:103:in `to_user'","lib/twitter_sync.rb:423:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/transaction.rb:10:in `execute'","lib/twitter_sync.rb:420:in `to_group'","lib/twitter_sync.rb:433:in `block in to_group'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`id` IN (4, 3) ORDER BY `cti_caller_ids`.`id` DESC","table":"cti_caller_ids","md5":"173709995c04ac9a2ab8c69c40d7d291","messages":[{"tag":"access_type_range","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":28,"cost":1.09375e-05}],"cost":1.11875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"cti_caller_ids","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"4K"},"used_columns":["id","caller_id","comment","level","object","o_id","user_id","preferences","created_at","updated_at"],"attached_condition":"(`zammad_development`.`cti_caller_ids`.`id` in (4,3))"}}}},"backtrace":["app/models/cti/caller_id.rb:64:in `lookup'","app/models/cti/caller_id.rb:285:in `get_comment_preferences'","app/jobs/update_cti_logs_by_caller_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'"]},{"sql":"SELECT `users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 500","table":"users","md5":"d8a2175b04deba04a8f6e02518a06815","messages":[{"tag":"limited_scan","cost":0.000125,"table":"users","rows_read":500},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.000125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.65"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"users","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.40","prefix_cost":"0.65","data_read_per_join":"185K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/cti/caller_id.rb:177:in `block (2 levels) in rebuild'","app/models/cti/caller_id.rb:174:in `each'","app/models/cti/caller_id.rb:174:in `block in rebuild'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `tickets`.* FROM `tickets` ORDER BY `tickets`.`id` ASC LIMIT 500","table":"tickets","md5":"86857348fa1f0bcc95f8971f24e5b08a","messages":[{"tag":"limited_scan","cost":0.000125,"table":"tickets","rows_read":500},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.000125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"83896.93"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":500,"rows_produced_per_join":779064,"filtered":"100.00","cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/cti/caller_id.rb:177:in `block (2 levels) in rebuild'","app/models/cti/caller_id.rb:174:in `each'","app/models/cti/caller_id.rb:174:in `block in rebuild'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 1 ORDER BY `ticket_articles`.`created_at` ASC, `ticket_articles`.`id` ASC LIMIT 1","table":"ticket_articles","md5":"640a3f8287c75c308bea978643973fed","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.837500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`ticket_articles`.`ticket_id` <=> 1)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/cti/caller_id.rb:98:in `build_item'","app/models/cti/caller_id.rb:178:in `block (3 levels) in rebuild'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:63:in `block (2 levels) in find_each'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:63:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:63:in `block in find_each'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:129:in `block in find_in_batches'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:230:in `block in in_batches'","gems/activerecord-5.1.6.1/lib/active_record/relation/batches.rb:214:in `loop'"]},{"sql":"SELECT `cti_logs`.* FROM `cti_logs` ORDER BY created_at DESC, id DESC LIMIT 60","table":"cti_logs","md5":"9d158553dcf8bbeea8ba67734599bd18","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"cti_logs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"cti_logs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"5K"},"used_columns":["id","direction","state","from","from_comment","to","to_comment","queue","call_id","comment","initialized_at","start_at","end_at","duration_waiting_time","duration_talking_time","done","preferences","created_at","updated_at"]}}}},"backtrace":["app/models/cti/log.rb:287:in `map'","app/models/cti/log.rb:287:in `log'","spec/models/cti/log_spec.rb:8:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `users`.id AS `members` FROM `organizations` LEFT OUTER JOIN `users` ON `users`.`organization_id` = `organizations`.`id` WHERE `organizations`.`id` = 1","table":"organizations","md5":"dc6f9c951171648720d7ae030b07046b","messages":[{"tag":"access_type_const","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.0062499999999999995,"rows_read":25000,"index":"index_users_on_organization_id","index_used":["organization_id"]},{"tag":"retsize","result_size":25001,"result_bytes":100004,"cost":0.0390640625}],"cost":0.0453143125,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"nested_loop":[{"table":{"table_name":"organizations","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"15K"},"used_columns":["id"]}},{"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_organization_id"],"key":"index_users_on_organization_id","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/organization/assets.rb:37:in `assets'","app/models/user/assets.rb:97:in `assets'","app/models/cti/log.rb:292:in `block in log'","app/models/cti/log.rb:292:in `each'","app/models/cti/log.rb:292:in `with_object'","app/models/cti/log.rb:292:in `log'","spec/models/cti/log_spec.rb:25:in `block (4 levels) in <top (required)>'"]},{"sql":"SELECT `cti_logs`.* FROM `cti_logs` WHERE `cti_logs`.`call_id` = '1' LIMIT 1","table":"cti_logs","md5":"6f21bf90967eda718872d356d0449e7b","messages":[{"tag":"access_type_const","table":"cti_logs"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/cti/log.rb:357:in `process'","spec/models/cti/log_spec.rb:50:in `block (6 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:141:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb:65:in `to'"]},{"sql":"SELECT `cti_logs`.* FROM `cti_logs` WHERE `cti_logs`.`id` = 82 LIMIT 1 FOR UPDATE","table":"cti_logs","md5":"d6e97647bab18bc589275f7cd6cfdabc","messages":[{"tag":"access_type_const","table":"cti_logs"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/cti/log.rb:384:in `process'","spec/models/cti/log_spec.rb:105:in `block (7 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:208:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:183:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb:152:in `block in initialize'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:208:in `perform_change'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`email_address_id` = 54","table":"groups","md5":"43125682bcf3decc3a2e011171a00f3b","messages":[{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_a828c3963d","index_used":["email_address_id"]},{"tag":"retsize","result_size":1,"result_bytes":82,"cost":3.203125e-05}],"cost":3.228125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_a828c3963d"],"key":"fk_rails_a828c3963d","used_key_parts":["email_address_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/email_address.rb:74:in `delete_group_reference'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT 1 AS one FROM `groups` WHERE `groups`.`id` = 56 LIMIT 1","table":"groups","md5":"c6fc8698b9f037370ac892d6ce325382","messages":[{"tag":"access_type_const","table":"groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/has_exists_check_by_object_and_id.rb:26:in `exists_by_object_and_id?'","app/models/activity_stream.rb:53:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT 1 AS one FROM `import_jobs` WHERE `import_jobs`.`name` = 'Import::Test' AND `import_jobs`.`dry_run` = 1 AND `import_jobs`.`finished_at` IS NULL LIMIT 1","table":"import_jobs","md5":"eba76722efa0167ccb310dad87f73233","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"import_jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["name","dry_run","finished_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`dry_run` = 1) and (`zammad_development`.`import_jobs`.`name` = 'Import::Test') and isnull(`zammad_development`.`import_jobs`.`finished_at`))"}}},"backtrace":["app/models/import_job.rb:75:in `dry_run'","spec/models/import_job_spec.rb:44:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:141:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb:65:in `to'"]},{"sql":"SELECT 1 AS one FROM `import_jobs` WHERE `import_jobs`.`name` = 'Import::Test' AND `import_jobs`.`finished_at` IS NULL LIMIT 1","table":"import_jobs","md5":"4ccf654a7355d122aeda198d23c0e94f","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"import_jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["name","finished_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`name` = 'Import::Test') and isnull(`zammad_development`.`import_jobs`.`finished_at`))"}}},"backtrace":["app/models/import_job.rb:123:in `block in queue_registered'","app/models/import_job.rb:116:in `each'","app/models/import_job.rb:116:in `queue_registered'","spec/models/import_job_spec.rb:88:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:94:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:47:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'"]},{"sql":"SELECT `import_jobs`.* FROM `import_jobs` WHERE `import_jobs`.`started_at` IS NULL AND `import_jobs`.`dry_run` = 0","table":"import_jobs","md5":"f258d2b39c59edb8eecb0d8bf203de6c","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"import_jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["id","name","dry_run","payload","result","started_at","finished_at","created_at","updated_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`dry_run` = 0) and isnull(`zammad_development`.`import_jobs`.`started_at`))"}}},"backtrace":["app/models/import_job.rb:105:in `start'","spec/models/import_job_spec.rb:135:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:141:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb:65:in `to'"]},{"sql":"SELECT `overviews`.* FROM `overviews` WHERE `overviews`.`id` = 65 AND (`overviews`.`prio` != 1) LIMIT 1","table":"overviews","md5":"29294035a36a6ef13d3974cc9b2d168c","messages":[{"tag":"access_type_const","table":"overviews"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/core_ext/activesupport/lib/active_support/callbacks.rb:27:in `without_callback'","app/models/overview.rb:48:in `block in rearrangement'","app/models/overview.rb:34:in `each'","app/models/overview.rb:34:in `rearrangement'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'"]},{"sql":"SELECT `roles`.* FROM `roles` INNER JOIN `overviews_roles` ON `roles`.`id` = `overviews_roles`.`role_id` WHERE `overviews_roles`.`overview_id` = 67","table":"roles","md5":"b522510a536944f54d7eafd2be08bcd5","messages":[{"tag":"access_type_ref","table_size":1000,"table":"overviews_roles","cost":2.5e-07,"rows_read":1,"index":"index_overviews_roles_on_overview_id","index_used":["overview_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"overviews_roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":136,"cost":5.3125000000000004e-05}],"cost":5.3625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"overviews_roles","access_type":"ref","possible_keys":["index_overviews_roles_on_overview_id","index_overviews_roles_on_role_id"],"key":"index_overviews_roles_on_overview_id","used_key_parts":["overview_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["overview_id","role_id"],"attached_condition":"(`zammad_development`.`overviews_roles`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.overviews_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}]}},"backtrace":["lib/core_ext/activesupport/lib/active_support/callbacks.rb:27:in `without_callback'","app/models/overview.rb:48:in `block in rearrangement'","app/models/overview.rb:34:in `each'","app/models/overview.rb:34:in `rearrangement'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'"]},{"sql":"SELECT o_id, recent_view_object_id, created_by_id, MAX(created_at) as created_at, MAX(id) as id FROM `recent_views` WHERE `recent_views`.`created_by_id` = 257 GROUP BY `recent_views`.`o_id`, `recent_views`.`recent_view_object_id`, `recent_views`.`created_by_id` ORDER BY MAX(created_at) DESC, MAX(id) DESC LIMIT 10","table":"recent_views","md5":"b2c8d22a5649da5f0460a193797f9aa9","messages":[{"tag":"access_type_ref","table_size":3,"table":"recent_views","cost":7.5e-07,"rows_read":3,"index":"index_recent_views_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":3,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.4812500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"ordering_operation":{"using_filesort":true,"grouping_operation":{"using_temporary_table":true,"using_filesort":false,"table":{"table_name":"recent_views","access_type":"ref","possible_keys":["index_recent_views_on_created_by_id"],"key":"index_recent_views_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`recent_views`.`created_by_id` <=> 257)","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"32"},"used_columns":["id","recent_view_object_id","o_id","created_by_id","created_at"]}}}}},"backtrace":["app/models/recent_view.rb:65:in `list'","spec/models/recent_view_spec.rb:15:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT 1 AS one FROM `organizations` WHERE `organizations`.`id` = 1 LIMIT 1","table":"organizations","md5":"9aae97a0b8f2b41ec3b0ed227ec00e27","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"organizations","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"organizations","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"15K"},"used_columns":["id"]}}},"backtrace":["app/models/application_model/has_exists_check_by_object_and_id.rb:26:in `exists_by_object_and_id?'","app/models/recent_view.rb:18:in `log'","spec/models/recent_view_spec.rb:35:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT o_id, recent_view_object_id, created_by_id, MAX(created_at) as created_at, MAX(id) as id FROM `recent_views` WHERE `recent_views`.`created_by_id` = 267 AND `recent_views`.`recent_view_object_id` = 4 GROUP BY `recent_views`.`o_id`, `recent_views`.`recent_view_object_id`, `recent_views`.`created_by_id` ORDER BY MAX(created_at) DESC, MAX(id) DESC LIMIT 10","table":"recent_views","md5":"4ed236f8a7b3743f411d289abd6ae46c","messages":[{"tag":"access_type_index_merge","table_size":3,"table":"recent_views","cost":2.5e-07,"rows_read":1,"index":"intersect(index_recent_views_on_created_by_id,index_recent_views_on_recent_view_object_id)","index_used":null},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":4.937500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"ordering_operation":{"using_filesort":true,"grouping_operation":{"using_temporary_table":true,"using_filesort":false,"table":{"table_name":"recent_views","access_type":"index_merge","possible_keys":["index_recent_views_on_created_by_id","index_recent_views_on_recent_view_object_id"],"key":"intersect(index_recent_views_on_created_by_id,index_recent_views_on_recent_view_object_id)","key_length":"4,4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"32"},"used_columns":["id","recent_view_object_id","o_id","created_by_id","created_at"],"attached_condition":"((`zammad_development`.`recent_views`.`recent_view_object_id` = 4) and (`zammad_development`.`recent_views`.`created_by_id` = 267))"}}}}},"backtrace":["app/models/recent_view.rb:65:in `list'","spec/models/recent_view_spec.rb:37:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT 1 AS one FROM `groups_users` LEFT OUTER JOIN `groups` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 269 AND `groups_users`.`group_id` = 105 AND `groups_users`.`access` = 'full' AND `groups`.`active` = 1 LIMIT 1","table":"groups_users","md5":"7ac5426a82d001754a23e3869abd3f46","messages":[{"tag":"access_type_const","table":"groups_users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_groups.rb:75:in `group_access?'","app/models/ticket.rb:1279:in `check_owner_active'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `roles`.`id` FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 269","table":"roles","md5":"5f71939626b5832399ac2863c1fbe782","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id"]}}]}},"backtrace":["app/models/concerns/has_roles.rb:27:in `role_access?'","app/models/concerns/has_groups.rb:87:in `group_access?'","app/models/ticket.rb:1279:in `check_owner_active'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`role_id` IN (1, 2) AND `roles_groups`.`group_id` = 105 AND `roles_groups`.`access` = 'full' AND `groups`.`active` = 1 AND `roles`.`active` = 1 LIMIT 1","table":"roles_groups","md5":"ec5875c4f845250d151594f703b895d1","messages":[{"tag":"access_type_const","table":"roles_groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_roles.rb:26:in `role_access?'","app/models/concerns/has_groups.rb:87:in `group_access?'","app/models/ticket.rb:1279:in `check_owner_active'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` WHERE (id IN (197) AND state_id in (4,1,2,7,3))","table":"tickets","md5":"f1e53b8d59fe4cb2d8a2be3b12c45d77","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY","index_tickets_on_state_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","state_id"]}}},"backtrace":["app/models/recent_view.rb:59:in `list'","spec/models/recent_view_spec.rb:44:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT 1 AS one FROM `groups_users` LEFT OUTER JOIN `groups` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 275 AND `groups_users`.`group_id` = 108 AND `groups_users`.`access` IN ('read', 'full') AND `groups`.`active` = 1 LIMIT 1","table":"groups_users","md5":"7c0f2bb4b895e182809f59601c74d948","messages":[{"tag":"access_type_const","table":"groups_users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_groups.rb:75:in `group_access?'","app/models/ticket/checks_access.rb:38:in `access?'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `public_send'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `try!'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:6:in `try'","app/models/recent_view.rb:82:in `access'","app/models/recent_view.rb:65:in `block in list'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`role_id` = 2 AND `roles_groups`.`group_id` = 108 AND `roles_groups`.`access` IN ('read', 'full') AND `groups`.`active` = 1 AND `roles`.`active` = 1 LIMIT 1","table":"roles_groups","md5":"3824eee84d3d709b7eaca15f4bc8c5a0","messages":[{"tag":"access_type_const","table":"roles_groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_roles.rb:26:in `role_access?'","app/models/concerns/has_groups.rb:87:in `group_access?'","app/models/ticket/checks_access.rb:38:in `access?'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `public_send'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `try!'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:6:in `try'","app/models/recent_view.rb:82:in `access'","app/models/recent_view.rb:65:in `block in list'"]},{"sql":"SELECT `recent_views`.* FROM `recent_views` WHERE `recent_views`.`created_by_id` = 284","table":"recent_views","md5":"112db7939d508ce93b8b01c7e9a9eba3","messages":[{"tag":"access_type_ref","table_size":3,"table":"recent_views","cost":7.5e-07,"rows_read":3,"index":"index_recent_views_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":3,"result_bytes":96,"cost":3.7500000000000003e-05}],"cost":3.825e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"recent_views","access_type":"ref","possible_keys":["index_recent_views_on_created_by_id"],"key":"index_recent_views_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"32"},"used_columns":["id","recent_view_object_id","o_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/recent_view.rb:34:in `user_log_destroy'","spec/models/recent_view_spec.rb:129:in `block (4 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:208:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:183:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'"]},{"sql":"SELECT `overviews`.* FROM `overviews` WHERE `overviews`.`id` = 1 LIMIT 1","table":"overviews","md5":"bf785a9e77a35ab1e8e60fb60f8d8c6d","messages":[{"tag":"access_type_const","table_size":9,"table":"overviews","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"overviews","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"13K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `public_send'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:17:in `try!'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/object/try.rb:6:in `try'","app/models/recent_view.rb:81:in `access'","app/models/recent_view.rb:16:in `log'","spec/models/recent_view_spec.rb:168:in `block (5 levels) in <top (required)>'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` WHERE `roles_groups`.`role_id` = 5 AND `roles_groups`.`group_id` = 113 AND (`roles_groups`.`access` != 'full') LIMIT 1","table":"roles_groups","md5":"25693ef4aa41b6b5cd3fbf2f05b268b4","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"((`zammad_development`.`roles_groups`.`group_id` = 113) and (`zammad_development`.`roles_groups`.`access` <> 'full'))"}}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `users`.id AS `users` FROM `groups` LEFT OUTER JOIN `groups_users` ON `groups_users`.`group_id` = `groups`.`id` LEFT OUTER JOIN `users` ON `users`.`id` = `groups_users`.`user_id` WHERE `groups`.`id` = 113","table":"groups","md5":"bfcf338d3f433d5a0c545d09c6afe541","messages":[{"tag":"access_type_const","table":"groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/application_model/can_assets.rb:31:in `assets'","spec/models/role_group_spec.rb:18:in `block (2 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `recent_views`.* FROM `recent_views` WHERE `recent_views`.`recent_view_object_id` = 36 AND `recent_views`.`o_id` IN (7, 115, 0)","table":"recent_views","md5":"54ac9e3141214f02be70963bed162c7e","messages":[{"tag":"access_type_ref","table_size":3,"table":"recent_views","cost":7.5e-07,"rows_read":3,"index":"index_recent_views_on_recent_view_object_id","index_used":["recent_view_object_id"]},{"tag":"retsize","result_size":3,"result_bytes":96,"cost":3.7500000000000003e-05}],"cost":3.825e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"recent_views","access_type":"ref","possible_keys":["index_recent_views_on_o_id","index_recent_views_on_recent_view_object_id"],"key":"index_recent_views_on_recent_view_object_id","used_key_parts":["recent_view_object_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"32"},"used_columns":["id","recent_view_object_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`recent_views`.`o_id` in (7,115,0))"}}},"backtrace":["app/models/recent_view.rb:30:in `log_destroy'","app/models/application_model/has_recent_views.rb:19:in `recent_view_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `external_syncs`.* FROM `external_syncs` WHERE `external_syncs`.`object` = 'RoleGroup' AND `external_syncs`.`o_id` IN (7, 115, 0)","table":"external_syncs","md5":"21cb207872fcba83fb45302f894fdbb8","messages":[{"tag":"access_type_range","table_size":0,"table":"external_syncs","cost":2.5e-07,"rows_read":1,"index":"index_external_syncs_on_object_and_o_id","index_used":["object","o_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.11"},"table":{"table_name":"external_syncs","access_type":"range","possible_keys":["index_external_syncs_on_object_and_o_id"],"key":"index_external_syncs_on_object_and_o_id","used_key_parts":["object","o_id"],"key_length":"306","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","index_condition":"((`zammad_development`.`external_syncs`.`object` = 'RoleGroup') and (`zammad_development`.`external_syncs`.`o_id` in (7,115,0)))","cost_info":{"read_cost":"1.81","eval_cost":"0.30","prefix_cost":"2.11","data_read_per_join":"3K"},"used_columns":["id","source","source_id","object","o_id","last_payload","created_at","updated_at"]}}},"backtrace":["app/models/application_model/has_external_sync.rb:13:in `external_sync_destroy'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_destroy_callbacks'"]},{"sql":"SELECT `roles_groups`.* FROM `roles_groups` WHERE `roles_groups`.`role_id` = 8","table":"roles_groups","md5":"09177410b52ab3a017018ad06e8263c9","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"retsize","result_size":1,"result_bytes":8,"cost":3.125e-06}],"cost":3.3750000000000003e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"]}}},"backtrace":["app/models/concerns/has_groups.rb:275:in `destroy_group_relations'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `groups`.`id` FROM `groups` WHERE `groups`.`name` = 'Group 114'","table":"groups","md5":"27eac04ec4045e6b1adf006673171270","messages":[{"tag":"access_type_const","table":"groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_groups.rb:161:in `block in group_names_access_map='","app/models/concerns/has_groups.rb:222:in `block (2 levels) in groups_access_map_store'","app/models/concerns/has_groups.rb:219:in `each'","app/models/concerns/has_groups.rb:219:in `block in groups_access_map_store'","app/models/concerns/has_groups.rb:236:in `fill_group_access_buffer'","app/models/concerns/has_groups.rb:218:in `groups_access_map_store'","app/models/concerns/has_groups.rb:160:in `group_names_access_map='","spec/models/concerns/has_groups_examples.rb:591:in `block (3 levels) in <top (required)>'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` WHERE `roles_groups`.`role_id` = 3037 AND `roles_groups`.`group_id` = 118 AND `roles_groups`.`access` = 'full' LIMIT 1","table":"roles_groups","md5":"e6de7238e778590a856ed897ccfa181d","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"((`zammad_development`.`roles_groups`.`group_id` = 118) and (`zammad_development`.`roles_groups`.`access` = 'full'))"}}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` = 3047 AND `roles_groups`.`group_id` = 137 AND `roles_groups`.`access` IN ('read', 'full') AND `groups`.`active` = 1 LIMIT 1","table":"roles_groups","md5":"fc5eff61fc33ba4d3daacb96aafac8a8","messages":[{"tag":"access_type_const","table":"roles_groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_groups.rb:75:in `group_access?'","spec/models/concerns/has_groups_examples.rb:108:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `groups`.`name`, `access` FROM `groups` INNER JOIN `roles_groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` = 3075 AND `groups`.`active` = 1","table":"groups","md5":"4ec9a689f437533aa3faf943509dc8c3","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_role_id","index_used":["role_id"]},{"tag":"retsize","result_size":2,"result_bytes":10,"cost":3.90625e-06}],"cost":4.40625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}},{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id"],"key":"index_roles_groups_on_role_id","used_key_parts":["role_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`group_id` = `zammad_development`.`groups`.`id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:211:in `groups_access_map'","app/models/concerns/has_groups.rb:149:in `group_names_access_map'","spec/models/concerns/has_groups_examples.rb:316:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT COUNT(*) FROM `permissions` INNER JOIN `permissions_roles` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `permissions_roles`.`role_id` = 3091","table":"permissions","md5":"dc0a0aab2fa55b8d88fb38ed8c37d74b","messages":[{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":52,"table":"permissions","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.0e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`permission_id` is not null)"}},{"table":{"table_name":"permissions","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.permission_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"31K"},"used_columns":["id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `roles`.* FROM `roles` INNER JOIN `roles_groups` ON `roles_groups`.`role_id` = `roles`.`id` WHERE `roles_groups`.`group_id` = 209 AND `roles_groups`.`access` IN ('read', 'full') AND `roles`.`active` = 1","table":"roles","md5":"575613fb415567ed91a2d425feb8abd2","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":136,"cost":5.3125000000000004e-05}],"cost":5.3625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`access` in ('read','full'))"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_groups.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"365"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:297:in `collect'","app/models/concerns/has_groups.rb:297:in `group_access_ids'","spec/models/concerns/has_groups_examples.rb:576:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `roles`.`id` FROM `roles` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `permissions`.`name` = 'ticket.agent' AND `permissions`.`active` = 1 AND `roles`.`active` = 1","table":"roles","md5":"7f7d15d8a6329a4ad1507dce889100ac","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":2.5e-07,"rows_read":1,"index":"index_permissions_roles_on_permission_id","index_used":["permission_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":4.125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"permissions","access_type":"const","possible_keys":["PRIMARY","index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id","name","active"]}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_permission_id","used_key_parts":["permission_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"365"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}}]}},"backtrace":["app/models/role.rb:199:in `validate_agent_limit_by_attributes'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT DISTINCT `users`.`id` FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles`.`id` = 2 AND `users`.`active` = 1","table":"users","md5":"c088bb0008c44a314f538bc43ae919fb","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"roles_users","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":4.125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`user_id` is not null)"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY","index_users_on_login","index_users_on_email","index_users_on_organization_id","index_users_on_image","index_users_on_department","index_users_on_phone","index_users_on_fax","index_users_on_mobile","index_out_of_office","index_users_on_out_of_office_replacement_id","index_users_on_source","index_users_on_created_by_id","fk_rails_355a7ffe95","index_users_on_last_login"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}}]}}},"backtrace":["app/models/role.rb:200:in `validate_agent_limit_by_attributes'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `schedulers`.* FROM `schedulers` WHERE `schedulers`.`status` = 'error' AND `schedulers`.`active` = 0","table":"schedulers","md5":"c46f389f39cd81e8d23b208befdb7313","messages":[{"tag":"access_type_tablescan","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":null,"index_used":null},{"tag":"retsize","result_size":21,"result_bytes":1827,"cost":0.000713671875}],"cost":0.000718921875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.35"},"table":{"table_name":"schedulers","access_type":"ALL","rows_examined_per_scan":21,"rows_produced_per_join":1,"filtered":"4.76","cost_info":{"read_cost":"2.25","eval_cost":"0.10","prefix_cost":"2.35","data_read_per_join":"4K"},"used_columns":["id","name","method","period","running","last_run","prio","pid","note","error_message","status","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`schedulers`.`active` = 0) and (`zammad_development`.`schedulers`.`status` = 'error'))"}}},"backtrace":["app/models/scheduler.rb:403:in `restart_failed_jobs'","spec/models/scheduler_spec.rb:45:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `delayed_jobs`.* FROM `delayed_jobs` WHERE (updated_at < '2019-02-25 16:13:32.810442') AND (`delayed_jobs`.`locked_at` IS NOT NULL)","table":"delayed_jobs","md5":"74b1b36edf0bb128714542c5f4999397","messages":[{"tag":"access_type_tablescan","table_size":19,"table":"delayed_jobs","cost":4.749999999999999e-06,"rows_read":19,"index":null,"index_used":null},{"tag":"retsize","result_size":19,"result_bytes":11229,"cost":0.004386328125}],"cost":0.0043910781250000004,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.15"},"table":{"table_name":"delayed_jobs","access_type":"ALL","rows_examined_per_scan":19,"rows_produced_per_join":5,"filtered":"30.00","cost_info":{"read_cost":"1.58","eval_cost":"0.57","prefix_cost":"2.15","data_read_per_join":"8K"},"used_columns":["id","priority","attempts","handler","last_error","run_at","locked_at","failed_at","locked_by","queue","created_at","updated_at"],"attached_condition":"((`zammad_development`.`delayed_jobs`.`updated_at` < '2019-02-25 16:13:32.810442') and (`zammad_development`.`delayed_jobs`.`locked_at` is not null))"}}},"backtrace":["app/models/scheduler.rb:141:in `block in cleanup_delayed_jobs'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","app/models/scheduler.rb:139:in `cleanup_delayed_jobs'","app/models/scheduler.rb:126:in `cleanup'","spec/models/scheduler_spec.rb:88:in `block (5 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT `import_jobs`.* FROM `import_jobs` WHERE `import_jobs`.`finished_at` IS NULL AND `import_jobs`.`dry_run` = 0 AND (`import_jobs`.`started_at` IS NOT NULL) AND (updated_at < '2019-02-25 16:13:32.810442')","table":"import_jobs","md5":"036fd065a14ab30ddedf7e5da634514d","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"import_jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["id","name","dry_run","payload","result","started_at","finished_at","created_at","updated_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`dry_run` = 0) and isnull(`zammad_development`.`import_jobs`.`finished_at`) and (`zammad_development`.`import_jobs`.`started_at` is not null) and (`zammad_development`.`import_jobs`.`updated_at` < '2019-02-25 16:13:32.810442'))"}}},"backtrace":["app/models/scheduler.rb:214:in `block in cleanup_import_jobs'","lib/mixin/start_finish_logger.rb:7:in `log_start_finish'","app/models/scheduler.rb:208:in `cleanup_import_jobs'","app/models/scheduler.rb:127:in `cleanup'","spec/models/scheduler_spec.rb:88:in `block (5 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb:71:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT `tag_items`.* FROM `tag_items` WHERE `tag_items`.`name` = 'test1'","table":"tag_items","md5":"392a299ddeb18ac065f3ad34a8d0d86c","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"tag_items","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":42,"cost":1.6406250000000002e-05}],"cost":1.665625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tag_items","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","name_downcase","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tag_items`.`name` = 'test1')"}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/tag.rb:201:in `lookup_by_name_and_create'","spec/models/tag_spec.rb:7:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:447:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:447:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:348:in `run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:507:in `block in run_owned_hooks_for'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (1 <= ( SELECT COUNT(*) FROM tag_objects, tag_items, tags WHERE tickets.id = tags.o_id AND tag_objects.id = tags.tag_object_id AND tag_objects.name = 'Ticket' AND tag_items.id = tags.tag_item_id AND tag_items.name IN ('test1') ) AND `tickets`.`id` IN (1))","table":"tickets","md5":"b7ff7e34721062fe4391abee4f1a5437","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables","optimized_away_subqueries":[{"dependent":true,"cacheable":false,"query_block":{"select_id":2,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["PRIMARY","index_tag_objects_on_name"],"key":"index_tag_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name"]}},{"table":{"table_name":"tag_items","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`tag_items`.`name` = 'test1')"}},{"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id","fk_rails_ebb54809f6"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"40"},"used_columns":["tag_item_id","tag_object_id","o_id"],"attached_condition":"((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1'))"}}]}}]}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `tag_items`.* FROM `tag_items` WHERE `tag_items`.`id` = 1 LIMIT 1","table":"tag_items","md5":"31e6a323f0fbaf31644e7dbeb621c2f9","messages":[{"tag":"access_type_const","table_size":1,"table":"tag_items","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tag_items","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","name_downcase","created_at","updated_at"]}}},"backtrace":["app/models/tag.rb:222:in `rename'","spec/models/tag_spec.rb:11:in `tag_rename'","spec/models/tag_spec.rb:20:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `jobs`.* FROM `jobs`","table":"jobs","md5":"774e5fb0b4dc1e69efb31384f2750a4d","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"jobs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"jobs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"9K"},"used_columns":["id","name","timeplan","condition","perform","disable_notification","last_run_at","next_run_at","running","processed","matching","pid","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/tag.rb:321:in `update_referenced_objects'","app/models/tag.rb:261:in `rename'","spec/models/tag_spec.rb:11:in `tag_rename'","spec/models/tag_spec.rb:20:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `postmaster_filters`.* FROM `postmaster_filters`","table":"postmaster_filters","md5":"25230561bdcb01bd5e304f2eb583c40b","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"postmaster_filters","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"postmaster_filters","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","name","channel","match","perform","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/tag.rb:321:in `update_referenced_objects'","app/models/tag.rb:261:in `rename'","spec/models/tag_spec.rb:11:in `tag_rename'","spec/models/tag_spec.rb:20:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `tags`.* FROM `tags` WHERE `tags`.`tag_item_id` = 1","table":"tags","md5":"e31735bbf5e7dcf9d4fab9d9d2f8b3f0","messages":[{"tag":"access_type_ref","table_size":1,"table":"tags","cost":2.5e-07,"rows_read":1,"index":"fk_rails_ebb54809f6","index_used":["tag_item_id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tags","access_type":"ref","possible_keys":["fk_rails_ebb54809f6"],"key":"fk_rails_ebb54809f6","used_key_parts":["tag_item_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["id","tag_item_id","tag_object_id","o_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/tag.rb:268:in `rename'","spec/models/tag_spec.rb:11:in `tag_rename'","spec/models/tag_spec.rb:20:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (3 = ( SELECT COUNT(*) FROM tag_objects, tag_items, tags WHERE tickets.id = tags.o_id AND tag_objects.id = tags.tag_object_id AND tag_objects.name = 'Ticket' AND tag_items.id = tags.tag_item_id AND tag_items.name IN ('test1','test2','test3') ) AND `tickets`.`id` IN (1))","table":"tickets","md5":"1208c4ebae7b529f1534d8fc92094dd2","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables","optimized_away_subqueries":[{"dependent":true,"cacheable":false,"query_block":{"select_id":2,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["PRIMARY","index_tag_objects_on_name"],"key":"index_tag_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name"]}},{"table":{"table_name":"tag_items","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`tag_items`.`name` in ('test1','test2','test3'))"}},{"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id","fk_rails_ebb54809f6"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"40"},"used_columns":["tag_item_id","tag_object_id","o_id"],"attached_condition":"((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1'))"}}]}}]}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (1 <= ( SELECT COUNT(*) FROM tag_objects, tag_items, tags WHERE tickets.id = tags.o_id AND tag_objects.id = tags.tag_object_id AND tag_objects.name = 'Ticket' AND tag_items.id = tags.tag_item_id AND tag_items.name IN ('test1') ))","table":"tickets","md5":"f8fe8d63f764b0e9cd7624058784b246","messages":[{"tag":"access_type_index","table_size":1000000,"table":"tickets","cost":0.25,"rows_read":1000000,"index":"index_tickets_on_state_id","index_used":["state_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.25,"severity":"medium","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"83896.93"},"table":{"table_name":"tickets","access_type":"index","possible_keys":["PRIMARY","index_tickets_on_number","index_tickets_on_state_id","index_tickets_on_priority_id","index_tickets_on_group_id","index_tickets_on_owner_id","index_tickets_on_customer_id","index_tickets_on_title","index_tickets_on_created_at","index_tickets_on_first_response_at","index_tickets_on_first_response_escalation_at","index_tickets_on_first_response_in_min","index_tickets_on_first_response_diff_in_min","index_tickets_on_close_at","index_tickets_on_close_escalation_at","index_tickets_on_close_in_min","index_tickets_on_close_diff_in_min","index_tickets_on_escalation_at","index_tickets_on_update_in_min","index_tickets_on_update_diff_in_min","index_tickets_on_last_contact_at","index_tickets_on_last_contact_agent_at","index_tickets_on_last_contact_customer_at","index_tickets_on_last_owner_update_at","index_tickets_on_create_article_type_id","index_tickets_on_create_article_sender_id","index_tickets_on_created_by_id","index_tickets_on_pending_time","index_tickets_on_type","index_tickets_on_time_unit","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb","fk_rails_edf0f77848"],"key":"index_tickets_on_state_id","used_key_parts":["state_id"],"key_length":"4","rows_examined_per_scan":779064,"rows_produced_per_join":779064,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id"],"attached_condition":"(1 <= (/* select#2 */ select count(0) from `zammad_development`.`tag_objects` join `zammad_development`.`tag_items` join `zammad_development`.`tags` where ((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1') and (`zammad_development`.`tickets`.`id` = `zammad_development`.`tags`.`o_id`) and ('Ticket' = 'Ticket') and (`zammad_development`.`tag_items`.`name` = 'test1'))))","attached_subqueries":[{"dependent":true,"cacheable":false,"query_block":{"select_id":2,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["PRIMARY","index_tag_objects_on_name"],"key":"index_tag_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name"]}},{"table":{"table_name":"tag_items","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`tag_items`.`name` = 'test1')"}},{"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id","fk_rails_ebb54809f6"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["zammad_development.tickets.id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"40"},"used_columns":["tag_item_id","tag_object_id","o_id"],"attached_condition":"((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1'))"}}]}}]}}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (3 = ( SELECT COUNT(*) FROM tag_objects, tag_items, tags WHERE tickets.id = tags.o_id AND tag_objects.id = tags.tag_object_id AND tag_objects.name = 'Ticket' AND tag_items.id = tags.tag_item_id AND tag_items.name IN ('test1','test2','test3') ))","table":"tickets","md5":"2878f4d293e24bf2575d74edc610b69c","messages":[{"tag":"access_type_index","table_size":1000000,"table":"tickets","cost":0.25,"rows_read":1000000,"index":"index_tickets_on_state_id","index_used":["state_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.25,"severity":"medium","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"83896.93"},"table":{"table_name":"tickets","access_type":"index","possible_keys":["PRIMARY","index_tickets_on_number","index_tickets_on_state_id","index_tickets_on_priority_id","index_tickets_on_group_id","index_tickets_on_owner_id","index_tickets_on_customer_id","index_tickets_on_title","index_tickets_on_created_at","index_tickets_on_first_response_at","index_tickets_on_first_response_escalation_at","index_tickets_on_first_response_in_min","index_tickets_on_first_response_diff_in_min","index_tickets_on_close_at","index_tickets_on_close_escalation_at","index_tickets_on_close_in_min","index_tickets_on_close_diff_in_min","index_tickets_on_escalation_at","index_tickets_on_update_in_min","index_tickets_on_update_diff_in_min","index_tickets_on_last_contact_at","index_tickets_on_last_contact_agent_at","index_tickets_on_last_contact_customer_at","index_tickets_on_last_owner_update_at","index_tickets_on_create_article_type_id","index_tickets_on_create_article_sender_id","index_tickets_on_created_by_id","index_tickets_on_pending_time","index_tickets_on_type","index_tickets_on_time_unit","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb","fk_rails_edf0f77848"],"key":"index_tickets_on_state_id","used_key_parts":["state_id"],"key_length":"4","rows_examined_per_scan":779064,"rows_produced_per_join":779064,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id"],"attached_condition":"(3 = (/* select#2 */ select count(0) from `zammad_development`.`tag_objects` join `zammad_development`.`tag_items` join `zammad_development`.`tags` where ((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1') and (`zammad_development`.`tickets`.`id` = `zammad_development`.`tags`.`o_id`) and ('Ticket' = 'Ticket') and (`zammad_development`.`tag_items`.`name` in ('test1','test2','test3')))))","attached_subqueries":[{"dependent":true,"cacheable":false,"query_block":{"select_id":2,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["PRIMARY","index_tag_objects_on_name"],"key":"index_tag_objects_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name"]}},{"table":{"table_name":"tag_items","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`tag_items`.`name` in ('test1','test2','test3'))"}},{"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id","fk_rails_ebb54809f6"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["zammad_development.tickets.id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"40"},"used_columns":["tag_item_id","tag_object_id","o_id"],"attached_condition":"((`zammad_development`.`tags`.`tag_item_id` = `zammad_development`.`tag_items`.`id`) and (`zammad_development`.`tags`.`tag_object_id` = '1'))"}}]}}]}}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE ((`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)))","table":"tickets","md5":"c426c5850c7fa7751d7259688b974a02","messages":[{"tag":"access_type_range","table_size":1000000,"table":"tickets","cost":0.049999999999999996,"rows_read":200000,"index":"index_tickets_on_state_id","index_used":["state_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.049999999999999996,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"78278.49"},"table":{"table_name":"tickets","access_type":"range","possible_keys":["PRIMARY","index_tickets_on_number","index_tickets_on_state_id","index_tickets_on_priority_id","index_tickets_on_group_id","index_tickets_on_owner_id","index_tickets_on_customer_id","index_tickets_on_title","index_tickets_on_created_at","index_tickets_on_first_response_at","index_tickets_on_first_response_escalation_at","index_tickets_on_first_response_in_min","index_tickets_on_first_response_diff_in_min","index_tickets_on_close_at","index_tickets_on_close_escalation_at","index_tickets_on_close_in_min","index_tickets_on_close_diff_in_min","index_tickets_on_escalation_at","index_tickets_on_update_in_min","index_tickets_on_update_diff_in_min","index_tickets_on_last_contact_at","index_tickets_on_last_contact_agent_at","index_tickets_on_last_contact_customer_at","index_tickets_on_last_owner_update_at","index_tickets_on_create_article_type_id","index_tickets_on_create_article_sender_id","index_tickets_on_created_by_id","index_tickets_on_pending_time","index_tickets_on_type","index_tickets_on_time_unit","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb","fk_rails_edf0f77848"],"key":"index_tickets_on_state_id","used_key_parts":["state_id"],"key_length":"4","rows_examined_per_scan":389533,"rows_produced_per_join":389533,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"39325.19","eval_cost":"38953.30","prefix_cost":"78278.49","data_read_per_join":"802M"},"used_columns":["id","state_id"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` <> 4)"}}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `taskbars`.* FROM `taskbars` WHERE `taskbars`.`id` = 5 LIMIT 1 FOR UPDATE","table":"taskbars","md5":"12995ea0f6ef524e72449f6f2851f59f","messages":[{"tag":"access_type_const","table_size":3,"table":"taskbars","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"taskbars","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"7K"},"used_columns":["id","user_id","last_contact","client_id","key","callback","state","preferences","params","prio","notify","active","created_at","updated_at"]}}},"backtrace":["app/models/taskbar.rb:128:in `block in update_preferences_infos'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/taskbar.rb:125:in `update_preferences_infos'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'"]},{"sql":"SELECT 1 AS one FROM `ticket_articles` WHERE `ticket_articles`.`id` = 169 LIMIT 1","table":"ticket_articles","md5":"44e89361dc602d6192335c89ef82353b","messages":[{"tag":"access_type_const","table":"ticket_articles"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/has_exists_check_by_object_and_id.rb:26:in `exists_by_object_and_id?'","app/models/activity_stream.rb:53:in `add'","app/models/application_model/can_activity_stream_log.rb:45:in `activity_stream_log'","app/models/concerns/has_activity_stream_log.rb:21:in `activity_stream_create'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'"]},{"sql":"SELECT `delayed_jobs`.* FROM `delayed_jobs` WHERE `delayed_jobs`.`locked_at` = '2019-02-25 16:13:58' AND `delayed_jobs`.`locked_by` = 'host:alpha21 pid:33917' AND `delayed_jobs`.`failed_at` IS NULL ORDER BY `delayed_jobs`.`id` ASC LIMIT 1","table":"delayed_jobs","md5":"c23eaed5791b968c50b6826778508f56","messages":[{"tag":"access_type_index","table_size":19,"table":"delayed_jobs","cost":4.749999999999999e-06,"rows_read":19,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":591,"cost":0.000230859375}],"cost":0.000235609375,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.15"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"delayed_jobs","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"5.26","cost_info":{"read_cost":"2.05","eval_cost":"0.10","prefix_cost":"2.15","data_read_per_join":"1K"},"used_columns":["id","priority","attempts","handler","last_error","run_at","locked_at","failed_at","locked_by","queue","created_at","updated_at"],"attached_condition":"((`zammad_development`.`delayed_jobs`.`locked_at` = '2019-02-25 16:13:58') and (`zammad_development`.`delayed_jobs`.`locked_by` = 'host:alpha21 pid:33917') and isnull(`zammad_development`.`delayed_jobs`.`failed_at`))"}}}},"backtrace":["app/models/scheduler.rb:343:in `block in worker'","app/models/scheduler.rb:342:in `loop'","app/models/scheduler.rb:342:in `worker'","spec/models/ticket/article_spec.rb:37:in `block (8 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:94:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:52:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'"]},{"sql":"SELECT in_reply_to, message_id FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 210","table":"ticket_articles","md5":"c8ab0427ea2b957f59a21909f5f09188","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["ticket_id","message_id","in_reply_to"]}}},"backtrace":["app/models/ticket.rb:1171:in `get_references'","app/jobs/ticket_article_communicate_email_job.rb:59:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `roles_groups`.`role_id` FROM `roles_groups` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`group_id` = 216 AND `roles_groups`.`access` = 'full' AND `roles`.`active` = 1","table":"roles_groups","md5":"4d9cd19e97f9ed7c6fe28242ff9d72cb","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`access` = 'full')"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_groups.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"365"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_roles.rb:61:in `role_access'","app/models/concerns/has_groups.rb:335:in `group_access'","app/models/transaction/notification.rb:54:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/transaction/background_job.rb:26:in `perform'"]},{"sql":"SELECT DISTINCT `users`.* FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `users`.`active` = 1 AND 1=0","table":"users","md5":"4810896bbdc4f9adaff80ed55d6afcb9","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/concerns/has_roles.rb:63:in `role_access'","app/models/concerns/has_groups.rb:335:in `group_access'","app/models/transaction/notification.rb:54:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/transaction/background_job.rb:26:in `perform'"]},{"sql":"SELECT `users`.* FROM `users` INNER JOIN `groups_users` ON `groups_users`.`user_id` = `users`.`id` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `groups_users`.`group_id` = 216 AND `groups_users`.`access` = 'full' AND `users`.`active` = 1 AND `roles`.`active` = 1 AND `permissions`.`name` IN ('ticket', 'ticket.agent') AND `permissions`.`active` = 1","table":"users","md5":"524a999fef5947ca1e4196964cb50e55","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"groups_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"join_type_ref","table_size":1000,"table":"permissions_roles","join_to":"permissions","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_permission_id","index_used":["permission_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_ref","table_size":1000,"table":"roles_users","join_to":"groups_users","cost":5.0e-07,"rows_read":2,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":2,"result_bytes":2002,"cost":0.0007820312500000001}],"cost":0.00078428125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"nested_loop":[{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`access` = 'full')"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.groups_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}},{"table":{"table_name":"permissions","access_type":"range","possible_keys":["PRIMARY","index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":2,"rows_produced_per_join":0,"filtered":"10.00","index_condition":"(`zammad_development`.`permissions`.`name` in ('ticket','ticket.agent'))","using_join_buffer":"Block Nested Loop","cost_info":{"read_cost":"0.35","eval_cost":"0.01","prefix_cost":"1.05","data_read_per_join":"1K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_permission_id","used_key_parts":["permission_id"],"key_length":"5","ref":["zammad_development.permissions.id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","cost_info":{"read_cost":"0.01","eval_cost":"0.01","prefix_cost":"1.07","data_read_per_join":"0"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.01","eval_cost":"0.00","prefix_cost":"1.09","data_read_per_join":"19"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["zammad_development.groups_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.01","eval_cost":"0.00","prefix_cost":"1.10","data_read_per_join":"0"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` = `zammad_development`.`permissions_roles`.`role_id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:335:in `group_access'","app/models/transaction/notification.rb:54:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/transaction/background_job.rb:26:in `perform'","gems/delayed_job-4.1.3/lib/delayed/backend/base.rb:81:in `block in invoke_job'"]},{"sql":"SELECT `tickets`.* FROM `tickets` FORCE INDEX(`index_tickets_on_create_article_sender_id`) WHERE `tickets`.`created_by_id` = 1 AND `tickets`.`create_article_type_id` = 1 AND `tickets`.`create_article_sender_id` = 2 ORDER BY `tickets`.`id` DESC LIMIT 5","table":"tickets","md5":"bdbe684216e2e7f34150ddb7e7beec1e","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":5.0e-07,"rows_read":2,"index":"index_tickets_on_create_article_sender_id","index_used":["create_article_sender_id"]},{"tag":"retsize","result_size":2,"result_bytes":370,"cost":0.00014453125000000002}],"cost":0.00014503125000000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"56924.78"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_create_article_sender_id"],"key":"index_tickets_on_create_article_sender_id","used_key_parts":["create_article_sender_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"17971.58","eval_cost":"38953.20","prefix_cost":"56924.78","data_read_per_join":"802M"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`create_article_sender_id` <=> 2) and ((`zammad_development`.`tickets`.`create_article_type_id` = 1) and (`zammad_development`.`tickets`.`created_by_id` = 1)))"}}}},"backtrace":["lib/signature_detection.rb:192:in `by_user_id'","lib/signature_detection.rb:238:in `rebuild_user'","app/models/transaction/signature_detection.rb:48:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/transaction/background_job.rb:26:in `perform'"]},{"sql":"SELECT `karma_activity_logs`.* FROM `karma_activity_logs` WHERE `karma_activity_logs`.`user_id` = 1 ORDER BY `karma_activity_logs`.`created_at` DESC, `karma_activity_logs`.`id` DESC LIMIT 1 FOR UPDATE","table":"karma_activity_logs","md5":"04c6c49cfe587c19938dfc0162210f7e","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_user_id"],"key":"index_karma_activity_logs_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`karma_activity_logs`.`user_id` <=> 1)","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","user_id","activity_id","score","score_total","created_at","updated_at"]}}}},"backtrace":["app/models/karma/activity_log.rb:24:in `block in add'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/karma/activity_log.rb:23:in `add'"]},{"sql":"SELECT `karma_activity_logs`.* FROM `karma_activity_logs` WHERE `karma_activity_logs`.`user_id` = 1 AND `karma_activity_logs`.`object_lookup_id` = 2 AND `karma_activity_logs`.`o_id` = 210 AND `karma_activity_logs`.`activity_id` = 1 AND (created_at >= '2019-02-25 16:13:02.105180') LIMIT 1","table":"karma_activity_logs","md5":"64bf34a9c2c3d3031d9558e3b7c2a0c5","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_user_id","index_karma_activity_logs_on_created_at","index_karma_activity_logs_on_o_id_and_object_lookup_id","fk_rails_0517d121f2"],"key":"index_karma_activity_logs_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","user_id","activity_id","score","score_total","created_at","updated_at"],"attached_condition":"((`zammad_development`.`karma_activity_logs`.`activity_id` = 1) and (`zammad_development`.`karma_activity_logs`.`o_id` = 210) and (`zammad_development`.`karma_activity_logs`.`object_lookup_id` = 2) and (`zammad_development`.`karma_activity_logs`.`created_at` >= '2019-02-25 16:13:02.105180'))"}}},"backtrace":["app/models/karma/activity_log.rb:30:in `block in add'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/karma/activity_log.rb:23:in `add'"]},{"sql":"SELECT `karma_activity_logs`.* FROM `karma_activity_logs` WHERE `karma_activity_logs`.`user_id` = 1 ORDER BY `karma_activity_logs`.`id` DESC LIMIT 1","table":"karma_activity_logs","md5":"b0f03d0f8dd4271b67c082e2a2c0bf73","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_user_id"],"key":"index_karma_activity_logs_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","user_id","activity_id","score","score_total","created_at","updated_at"],"attached_condition":"((`zammad_development`.`karma_activity_logs`.`user_id` <=> 1))"}}}},"backtrace":["app/models/karma.rb:6:in `score_by_user'","app/models/karma/user.rb:7:in `sync'","app/models/karma/activity_log.rb:54:in `add'","app/models/transaction/karma.rb:51:in `ticket_karma'","app/models/transaction/karma.rb:34:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `karma_users`.* FROM `karma_users` WHERE `karma_users`.`user_id` = 1 LIMIT 1","table":"karma_users","md5":"7f902c32173be7a71d887b3d0450817b","messages":[{"tag":"access_type_const","table":"karma_users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/karma/user.rb:9:in `sync'","app/models/karma/activity_log.rb:54:in `add'","app/models/transaction/karma.rb:51:in `ticket_karma'","app/models/transaction/karma.rb:34:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`area` = 'Twitter::Account' AND `channels`.`active` = 1","table":"channels","md5":"04f34dfa6727e337d553b80b0a173b31","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"index_channels_on_area","index_used":["area"]},{"tag":"retsize","result_size":2,"result_bytes":680,"cost":0.000265625}],"cost":0.00026612500000000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["index_channels_on_area"],"key":"index_channels_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"50.00","cost_info":{"read_cost":"0.25","eval_cost":"0.05","prefix_cost":"0.35","data_read_per_join":"3K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`channels`.`active` = 1)"}}},"backtrace":["app/models/observer/ticket/article/communicate_twitter/background_job.rb:20:in `perform'","gems/delayed_job-4.1.3/lib/delayed/backend/base.rb:81:in `block in invoke_job'","gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:61:in `block in initialize'","gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:66:in `execute'","gems/delayed_job-4.1.3/lib/delayed/lifecycle.rb:40:in `run_callbacks'","gems/delayed_job-4.1.3/lib/delayed/backend/base.rb:78:in `invoke_job'","gems/delayed_job-4.1.3/lib/delayed/worker.rb:230:in `block (2 levels) in run'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'"]},{"sql":"SELECT `stores`.* FROM `stores` WHERE `stores`.`store_object_id` = 30 AND `stores`.`o_id` = 186 ORDER BY created_at ASC, id ASC","table":"stores","md5":"59fd12c453dbdbc3e5d3ba389bf533fa","messages":[{"tag":"access_type_ref","table_size":2,"table":"stores","cost":2.5e-07,"rows_read":1,"index":"index_stores_on_store_object_id_and_o_id","index_used":["store_object_id","o_id"]},{"tag":"retsize","result_size":1,"result_bytes":131,"cost":5.1171875e-05}],"cost":5.1421875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"stores","access_type":"ref","possible_keys":["index_stores_on_store_object_id_and_o_id"],"key":"index_stores_on_store_object_id_and_o_id","used_key_parts":["store_object_id","o_id"],"key_length":"12","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"((`zammad_development`.`stores`.`store_object_id` <=> 30) and (`zammad_development`.`stores`.`o_id` <=> 186))","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["id","store_object_id","store_file_id","o_id","preferences","size","filename","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/ticket/article.rb:165:in `clone_attachments'","spec/models/ticket/article_spec.rb:190:in `block (5 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.customer_id = 1) AND (tickets.id = articles.ticket_id AND `articles`.`from` LIKE ('%blubselector.de%') AND `tickets`.`id` IN (1))","table":"tickets","md5":"56b79e19a3de7d06b01574e324c60014","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT roles.id FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `users`.`id` = 316 AND `users`.`active` = 1 AND `roles`.`active` = 1","table":"users","md5":"ce89a50161ab847ba067a11296673e20","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket/overviews.rb:20:in `all'","app/models/ticket/overviews.rb:79:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT DISTINCT `overviews`.* FROM `overviews` INNER JOIN `overviews_roles` ON `overviews_roles`.`overview_id` = `overviews`.`id` INNER JOIN `roles` ON `roles`.`id` = `overviews_roles`.`role_id` LEFT OUTER JOIN `overviews_users` ON `overviews_users`.`overview_id` = `overviews`.`id` LEFT OUTER JOIN `users` ON `users`.`id` = `overviews_users`.`user_id` WHERE (`overviews_roles`.`role_id` = 3 AND `overviews_users`.`user_id` IS NULL AND `overviews`.`active` = 1 AND `overviews`.`organization_shared` = 0 OR `overviews_roles`.`role_id` = 3 AND `overviews_users`.`user_id` = 316 AND `overviews`.`active` = 1 AND `overviews`.`organization_shared` = 0) ORDER BY `overviews`.`prio` ASC, `overviews`.`name` ASC","table":"overviews","md5":"4156fdbdcfcb6dd722de3490ae60e0fb","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"overviews_roles","cost":1.0e-06,"rows_read":4,"index":"index_overviews_roles_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":9,"table":"overviews","join_to":"overviews_roles","cost":1.2499999999999999e-06,"rows_read":5,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_ref","table_size":1000,"table":"overviews_users","join_to":"overviews_roles","cost":1.2499999999999999e-06,"rows_read":5,"index":"index_overviews_users_on_overview_id","index_used":["overview_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"overviews_users","cost":1.2499999999999999e-06,"rows_read":5,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":5,"result_bytes":3325,"cost":0.001298828125}],"cost":0.001303828125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.78"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"0.22"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"overviews_roles","access_type":"ref","possible_keys":["index_overviews_roles_on_overview_id","index_overviews_roles_on_role_id"],"key":"index_overviews_roles_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","index_condition":"(`zammad_development`.`overviews_roles`.`role_id` = '3')","cost_info":{"read_cost":"0.50","eval_cost":"0.20","prefix_cost":"0.70","data_read_per_join":"32"},"used_columns":["overview_id","role_id"],"attached_condition":"(`zammad_development`.`overviews_roles`.`overview_id` is not null)"}},{"table":{"table_name":"overviews","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.overviews_roles.overview_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"11.11","cost_info":{"read_cost":"0.50","eval_cost":"0.02","prefix_cost":"1.40","data_read_per_join":"2K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`overviews`.`organization_shared` = 0) and (`zammad_development`.`overviews`.`active` = 1)) or ((`zammad_development`.`overviews`.`organization_shared` = 0) and (`zammad_development`.`overviews`.`active` = 1)))"}},{"table":{"table_name":"overviews_users","access_type":"ref","possible_keys":["index_overviews_users_on_overview_id"],"key":"index_overviews_users_on_overview_id","used_key_parts":["overview_id"],"key_length":"5","ref":["zammad_development.overviews_roles.overview_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","distinct":true,"cost_info":{"read_cost":"0.06","eval_cost":"0.02","prefix_cost":"1.48","data_read_per_join":"3"},"used_columns":["overview_id","user_id"],"attached_condition":"<if>(found_match(overviews_users), (((`zammad_development`.`overviews`.`organization_shared` = 0) and (`zammad_development`.`overviews`.`active` = 1) and isnull(`zammad_development`.`overviews_users`.`user_id`)) or ((`zammad_development`.`overviews`.`organization_shared` = 0) and (`zammad_development`.`overviews`.`active` = 1) and (`zammad_development`.`overviews_users`.`user_id` = 316))), true)"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.overviews_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","using_index":true,"distinct":true,"cost_info":{"read_cost":"0.06","eval_cost":"0.02","prefix_cost":"1.56","data_read_per_join":"10K"},"used_columns":["id"]}}]}}}},"backtrace":["app/models/ticket/overviews.rb:82:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT DISTINCT `tickets`.`id`, `tickets`.`updated_at`, `tickets`.`created_at` FROM `tickets` , ticket_articles articles WHERE (tickets.customer_id = 316) AND (tickets.id = articles.ticket_id AND `articles`.`from` LIKE ('%blubselector.de%')) ORDER BY `tickets`.`created_at` DESC LIMIT 2000","table":"tickets","md5":"ec7b895aefaede6597d1dabbe2a05019","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"join_type_ref","table_size":null,"table":"articles","join_to":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":20,"cost":7.8125e-06}],"cost":8.3125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.24"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"nested_loop":[{"table":{"table_name":"tickets","access_type":"ref","possible_keys":["PRIMARY","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 316)","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","customer_id","created_at","updated_at"]}},{"table":{"table_name":"articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["zammad_development.tickets.id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","distinct":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"1.25","data_read_per_join":"21K"},"used_columns":["id","ticket_id","from"],"attached_condition":"(`zammad_development`.`articles`.`from` like '%blubselector.de%')"}}]}}}},"backtrace":["app/models/ticket/overviews.rb:126:in `block in index'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket/overviews.rb:89:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.customer_id = 316) AND (tickets.id = articles.ticket_id AND `articles`.`from` LIKE ('%blubselector.de%'))","table":"tickets","md5":"c4e5e3ec82f7fda4d0e7e94469ec142b","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"join_type_ref","table_size":null,"table":"articles","join_to":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.44"},"nested_loop":[{"table":{"table_name":"tickets","access_type":"ref","possible_keys":["PRIMARY","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.99","eval_cost":"0.10","prefix_cost":"1.09","data_read_per_join":"2K"},"used_columns":["id","customer_id"]}},{"table":{"table_name":"articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["zammad_development.tickets.id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"1.44","data_read_per_join":"21K"},"used_columns":["ticket_id","from"],"attached_condition":"(`zammad_development`.`articles`.`from` like '%blubselector.de%')"}}]}},"backtrace":["app/models/ticket/overviews.rb:135:in `block in index'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket/overviews.rb:89:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT DISTINCT `tickets`.`id`, `tickets`.`updated_at`, `tickets`.`created_at` FROM `tickets` WHERE (tickets.customer_id = 316) AND (`tickets`.`state_id` IN (1,2,3,7,4,6) AND `tickets`.`customer_id` IN (316)) ORDER BY `tickets`.`created_at` DESC LIMIT 2000","table":"tickets","md5":"9763244deb79eee644d09dd51f741e70","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":20,"cost":7.8125e-06}],"cost":8.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 316)","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","state_id","customer_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` in (1,2,3,7,4,6))"}}}}},"backtrace":["app/models/ticket/overviews.rb:126:in `block in index'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket/overviews.rb:89:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 316) AND (`tickets`.`state_id` IN (1,2,3,7,4,6) AND `tickets`.`customer_id` IN (316))","table":"tickets","md5":"acd72a35d2d75e739f46930840acc3f6","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["PRIMARY","index_tickets_on_number","index_tickets_on_state_id","index_tickets_on_priority_id","index_tickets_on_group_id","index_tickets_on_owner_id","index_tickets_on_customer_id","index_tickets_on_title","index_tickets_on_created_at","index_tickets_on_first_response_at","index_tickets_on_first_response_escalation_at","index_tickets_on_first_response_in_min","index_tickets_on_first_response_diff_in_min","index_tickets_on_close_at","index_tickets_on_close_escalation_at","index_tickets_on_close_in_min","index_tickets_on_close_diff_in_min","index_tickets_on_escalation_at","index_tickets_on_update_in_min","index_tickets_on_update_diff_in_min","index_tickets_on_last_contact_at","index_tickets_on_last_contact_agent_at","index_tickets_on_last_contact_customer_at","index_tickets_on_last_owner_update_at","index_tickets_on_create_article_type_id","index_tickets_on_create_article_sender_id","index_tickets_on_created_by_id","index_tickets_on_pending_time","index_tickets_on_type","index_tickets_on_time_unit","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb","fk_rails_edf0f77848"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","state_id","customer_id"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` in (1,2,3,7,4,6))"}}},"backtrace":["app/models/ticket/overviews.rb:135:in `block in index'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket/overviews.rb:89:in `index'","spec/models/ticket/overviews_spec.rb:29:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'"]},{"sql":"SELECT `ticket_time_accountings`.* FROM `ticket_time_accountings` WHERE `ticket_time_accountings`.`ticket_id` = 229","table":"ticket_time_accountings","md5":"2989bfe6d3f5acf7c779fe252e973679","messages":[{"tag":"access_type_ref","table_size":0,"table":"ticket_time_accountings","cost":2.5e-07,"rows_read":1,"index":"index_ticket_time_accountings_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"ticket_time_accountings","access_type":"ref","possible_keys":["index_ticket_time_accountings_on_ticket_id"],"key":"index_ticket_time_accountings_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","ticket_id","ticket_article_id","time_unit","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket/time_accounting.rb:13:in `ticket_time_unit_update'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` , ticket_articles articles WHERE (tickets.id = articles.ticket_id AND `articles`.`from` LIKE ('%blubselector.de%'))","table":"tickets","md5":"986a4fe2e7bac25d365ea06b5918bbbc","messages":[{"tag":"access_type_tablescan","table_size":null,"table":"articles","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"articles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.44"},"nested_loop":[{"table":{"table_name":"articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":1,"filtered":"33.33","cost_info":{"read_cost":"0.45","eval_cost":"0.10","prefix_cost":"0.55","data_read_per_join":"63K"},"used_columns":["ticket_id","from"],"attached_condition":"(`zammad_development`.`articles`.`from` like '%blubselector.de%')"}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"1.45","data_read_per_join":"2K"},"used_columns":["id"]}}]}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `histories`.* FROM `histories` FORCE INDEX(`index_histories_on_history_object_id`) WHERE (((history_object_id = 4 AND o_id = 246) OR (history_object_id = 5 AND related_o_id = 246 ))) ORDER BY created_at ASC, id ASC","table":"histories","md5":"10410b4d7541859d2bc998658c553784","messages":[{"tag":"access_type_range","table_size":10000000,"table":"histories","cost":4.9999999999999996e-06,"rows_read":20,"index":"index_histories_on_history_object_id","index_used":["history_object_id"]},{"tag":"retsize","result_size":20,"result_bytes":1540,"cost":0.0006015625}],"cost":0.0006065625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"12.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"5.69"},"table":{"table_name":"histories","access_type":"range","possible_keys":["index_histories_on_history_object_id"],"key":"index_histories_on_history_object_id","used_key_parts":["history_object_id"],"key_length":"4","rows_examined_per_scan":13,"rows_produced_per_join":5,"filtered":"43.75","index_condition":"((`zammad_development`.`histories`.`history_object_id` = 4) or (`zammad_development`.`histories`.`history_object_id` = 5))","cost_info":{"read_cost":"5.79","eval_cost":"0.57","prefix_cost":"6.36","data_read_per_join":"17K"},"used_columns":["id","history_type_id","history_object_id","history_attribute_id","o_id","related_o_id","related_history_object_id","id_to","id_from","value_from","value_to","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`histories`.`o_id` = 246) and (`zammad_development`.`histories`.`history_object_id` = 4)) or ((`zammad_development`.`histories`.`related_o_id` = 246) and (`zammad_development`.`histories`.`history_object_id` = 5)))"}}}},"backtrace":["app/models/history.rb:171:in `list'","app/models/concerns/has_history.rb:210:in `history_get'","spec/models/ticket_spec.rb:85:in `block (5 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `history_objects`.* FROM `history_objects` WHERE `history_objects`.`id` = 4 LIMIT 1","table":"history_objects","md5":"8893887f3c17b1a7bc2750cd30e0b6c7","messages":[{"tag":"access_type_const","table_size":5,"table":"history_objects","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_objects","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","note","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:231:in `object_lookup_id'","app/models/history.rb:178:in `block in list'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/history.rb:171:in `list'","app/models/concerns/has_history.rb:210:in `history_get'"]},{"sql":"SELECT `history_types`.* FROM `history_types` WHERE `history_types`.`id` = 1 LIMIT 1","table":"history_types","md5":"09beb1705f6a1497687b2e09f159a317","messages":[{"tag":"access_type_const","table_size":3,"table":"history_types","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"history_types","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:218:in `type_lookup_id'","app/models/history.rb:179:in `block in list'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/history.rb:171:in `list'","app/models/concerns/has_history.rb:210:in `history_get'"]},{"sql":"SELECT `history_attributes`.* FROM `history_attributes` WHERE `history_attributes`.`id` = 110 LIMIT 1","table":"history_attributes","md5":"1d97ad0b7c01727a14c46f9369f82276","messages":[{"tag":"access_type_const","table":"history_attributes"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/history.rb:244:in `attribute_lookup_id'","app/models/history.rb:184:in `block in list'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/history.rb:171:in `list'","app/models/concerns/has_history.rb:210:in `history_get'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`id` IS NULL LIMIT 1","table":"ticket_articles","md5":"d1debae8ab5ee0ed14b3c5010e8c4ca9","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/ticket.rb:844:in `perform_changes'","spec/models/ticket_spec.rb:122:in `block (6 levels) in <top (required)>'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:373:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:94:in `perform_change'","gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb:52:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:78:in `does_not_match?'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:72:in `block in handle_matcher'","gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`role_id` = 2 AND `roles_groups`.`group_id` = 259 AND `roles_groups`.`access` = 'full' AND `groups`.`active` = 1 AND `roles`.`active` = 1 LIMIT 1","table":"roles_groups","md5":"2d7cbff7bdd8d87d1a2159eb1315c004","messages":[{"tag":"access_type_const","table":"roles_groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_roles.rb:26:in `role_access?'","app/models/concerns/has_groups.rb:87:in `group_access?'","app/models/ticket/checks_access.rb:38:in `access?'","spec/models/ticket_spec.rb:221:in `block (5 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `groups_users`.* FROM `groups_users` WHERE `groups_users`.`user_id` = 344","table":"groups_users","md5":"60c2cd85c5330c4f60ab7fd0be382952","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":4.937500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"]}}},"backtrace":["app/models/concerns/has_groups.rb:275:in `destroy_group_relations'","app/models/concerns/has_groups.rb:258:in `block in process_group_access_buffer'","app/models/concerns/has_groups.rb:250:in `flush_group_access_buffer'","app/models/concerns/has_groups.rb:257:in `process_group_access_buffer'","app/models/concerns/has_groups.rb:237:in `fill_group_access_buffer'","app/models/concerns/has_groups.rb:218:in `groups_access_map_store'","app/models/concerns/has_groups.rb:160:in `group_names_access_map='","spec/models/ticket_spec.rb:225:in `block (6 levels) in <top (required)>'"]},{"sql":"SELECT `tag_objects`.* FROM `tag_objects` WHERE `tag_objects`.`id` = 1 LIMIT 1","table":"tag_objects","md5":"97718b53aadacf97cb88785b094a7902","messages":[{"tag":"access_type_const","table_size":1,"table":"tag_objects","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tag_objects","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"776"},"used_columns":["id","name","created_at","updated_at"]}}},"backtrace":["app/models/observer/tag/ticket_history.rb:8:in `after_create'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'"]},{"sql":"SELECT 1 AS one FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 1 AND `roles`.`name` = 'Agent' LIMIT 1","table":"roles","md5":"2df157f491acadcc029a76c1530c5cce","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"index_roles_on_name","index_used":["name"]},{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY","index_roles_on_name"],"key":"index_roles_on_name","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name"]}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.35","data_read_per_join":"4"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` = '2')"}}]}},"backtrace":["app/models/user.rb:153:in `role?'","spec/factories/recent_view.rb:13:in `block (4 levels) in <top (required)>'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/finder_methods.rb:65:in `find'","gems/activerecord-5.1.6.1/lib/active_record/relation/finder_methods.rb:65:in `find'","gems/activerecord-5.1.6.1/lib/active_record/querying.rb:3:in `find'","gems/composite_primary_keys-10.0.5/lib/composite_primary_keys/core.rb:26:in `find'"]},{"sql":"SELECT `tags`.* FROM `tags` WHERE `tags`.`id` = 1 LIMIT 1","table":"tags","md5":"271b70cfbd8918d941aa65a99759545b","messages":[{"tag":"access_type_const","table_size":1,"table":"tags","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tags","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"40"},"used_columns":["id","tag_item_id","tag_object_id","o_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/observer/transaction.rb:135:in `block in get_uniq_changes'","app/models/observer/transaction.rb:117:in `each'","app/models/observer/transaction.rb:117:in `get_uniq_changes'","app/models/observer/transaction.rb:42:in `perform'","app/models/observer/transaction.rb:18:in `commit'","app/models/transaction.rb:16:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'"]},{"sql":"SELECT `stores`.* FROM `stores` WHERE `stores`.`id` = 172 LIMIT 1","table":"stores","md5":"653408f250140fb5356bcd382267331f","messages":[{"tag":"access_type_const","table":"stores"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/store.rb:160:in `remove_item'","app/models/store.rb:146:in `block in remove'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/store.rb:143:in `remove'","app/models/ticket/article.rb:399:in `store_delete'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT COUNT(*) FROM `stores` WHERE `stores`.`store_file_id` = 101","table":"stores","md5":"ecf890e84d0d9bac55fe24d8db4aed95","messages":[{"tag":"access_type_ref","table_size":2,"table":"stores","cost":5.0e-07,"rows_read":2,"index":"fk_rails_60bb0cecf9","index_used":["store_file_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stores","access_type":"ref","possible_keys":["fk_rails_60bb0cecf9"],"key":"fk_rails_60bb0cecf9","used_key_parts":["store_file_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["store_file_id"]}}},"backtrace":["app/models/store.rb:165:in `remove_item'","app/models/store.rb:146:in `block in remove'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/store.rb:143:in `remove'","app/models/ticket/article.rb:399:in `store_delete'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `stores`.* FROM `stores` WHERE `stores`.`store_file_id` = 101 ORDER BY `stores`.`id` ASC LIMIT 1","table":"stores","md5":"8bd10e5f4512d13214e94b41eb97840f","messages":[{"tag":"access_type_ref","table_size":2,"table":"stores","cost":5.0e-07,"rows_read":2,"index":"fk_rails_60bb0cecf9","index_used":["store_file_id"]},{"tag":"retsize","result_size":1,"result_bytes":131,"cost":5.1171875e-05}],"cost":5.1671875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"stores","access_type":"ref","possible_keys":["fk_rails_60bb0cecf9"],"key":"fk_rails_60bb0cecf9","used_key_parts":["store_file_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`stores`.`store_file_id` <=> 101)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["id","store_object_id","store_file_id","o_id","preferences","size","filename","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/store.rb:165:in `remove_item'","app/models/store.rb:146:in `block in remove'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/store.rb:143:in `remove'","app/models/ticket/article.rb:399:in `store_delete'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'"]},{"sql":"SELECT `store_provider_dbs`.* FROM `store_provider_dbs` WHERE `store_provider_dbs`.`sha` = 'd26701a5dbc60ac56754d755d865b1151ef482e57d40d5287d84c4e4c75733bb'","table":"store_provider_dbs","md5":"9e86eeea760a8694501068307a1a2991","messages":[{"tag":"access_type_const","table":"store_provider_dbs"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/store/file.rb:148:in `destroy_provider'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `each'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `invoke_after'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:132:in `run_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:827:in `_run_destroy_callbacks'"]},{"sql":"SELECT 1 AS one FROM `tokens` WHERE `tokens`.`name` = '4sR4rRBAj7VOARQYx2AYUGx-FTRNMJ220zHIh-nasQIusAw8src9fmVsLxhrmNAy' LIMIT 1","table":"tokens","md5":"e04d1206792c5218e47fadcd145a1860","messages":[{"tag":"limited_scan","cost":0.0,"table":"tokens","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_name_and_action"],"key":"index_tokens_on_name_and_action","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["name"]}}},"backtrace":["app/models/token.rb:127:in `block in generate_token'","app/models/token.rb:125:in `loop'","app/models/token.rb:125:in `generate_token'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'"]},{"sql":"SELECT `tokens`.* FROM `tokens` WHERE `tokens`.`action` = 'PasswordReset' AND `tokens`.`name` = '4sR4rRBAj7VOARQYx2AYUGx-FTRNMJ220zHIh-nasQIusAw8src9fmVsLxhrmNAy' LIMIT 1","table":"tokens","md5":"f7f302bc16a6eaddf953e1553ecf4c7c","messages":[{"tag":"access_type_const","table":"tokens"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/token.rb:60:in `check'","spec/models/token_spec.rb:9:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `translations`.* FROM `translations` WHERE `translations`.`id` = 2828 LIMIT 1","table":"translations","md5":"a9e0a4df11ba4c5ba84e726b0d5715fa","messages":[{"tag":"access_type_const","table_size":52308,"table":"translations","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"translations","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"4K"},"used_columns":["id","locale","source","target","target_initial","format","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/translation.rb:442:in `block in remote_translation_need_update?'","app/models/translation.rb:435:in `each'","app/models/translation.rb:435:in `remote_translation_need_update?'","spec/models/translation_spec.rb:149:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT COUNT(*) FROM `translations` WHERE `translations`.`locale` = 'de-de'","table":"translations","md5":"0a91d776d0abdfb8316f4c92aa7e9a41","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.00039224999999999997,"rows_read":1569,"index":"index_translations_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.00039224999999999997,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"148.13"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_locale"],"key":"index_translations_on_locale","used_key_parts":["locale"],"key_length":"32","ref":["const"],"rows_examined_per_scan":1413,"rows_produced_per_join":1413,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"6.83","eval_cost":"141.30","prefix_cost":"148.13","data_read_per_join":"6M"},"used_columns":["locale"]}}},"backtrace":["app/models/translation.rb:141:in `lang'","spec/models/translation_spec.rb:188:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `translations`.* FROM `translations` WHERE `translations`.`locale` = 'de-de' AND (`translations`.`target` != '') ORDER BY `translations`.`source` ASC","table":"translations","md5":"41981e7b06eba9d9fc8f2643fec4fdde","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.00039224999999999997,"rows_read":1569,"index":"index_translations_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1569,"result_bytes":122382,"cost":0.04780546875}],"cost":0.04819771875,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1223.07"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_locale"],"key":"index_translations_on_locale","used_key_parts":["locale"],"key_length":"32","ref":["const"],"rows_examined_per_scan":1413,"rows_produced_per_join":1271,"filtered":"90.00","index_condition":"(`zammad_development`.`translations`.`locale` <=> 'de-de')","cost_info":{"read_cost":"1081.77","eval_cost":"127.17","prefix_cost":"1223.07","data_read_per_join":"5M"},"used_columns":["id","locale","source","target","target_initial","format","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`translations`.`target` <> '')"}}}},"backtrace":["app/models/translation.rb:149:in `lang'","spec/models/translation_spec.rb:188:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `translations`.* FROM `translations` WHERE `translations`.`locale` = 'de-de'","table":"translations","md5":"f2d7b8f4dc0051d3881926519797a806","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.00039224999999999997,"rows_read":1569,"index":"index_translations_on_locale","index_used":["locale"]},{"tag":"retsize","result_size":1569,"result_bytes":122382,"cost":0.04780546875}],"cost":0.04819771875,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1223.07"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["index_translations_on_locale"],"key":"index_translations_on_locale","used_key_parts":["locale"],"key_length":"32","ref":["const"],"rows_examined_per_scan":1413,"rows_produced_per_join":1413,"filtered":"100.00","cost_info":{"read_cost":"1081.77","eval_cost":"141.30","prefix_cost":"1223.07","data_read_per_join":"6M"},"used_columns":["id","locale","source","target","target_initial","format","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/translation.rb:111:in `reset'","spec/models/translation_spec.rb:233:in `block (3 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE ((`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `tickets`.`id` IN (283))","table":"tickets","md5":"2a4103fc6e14438bb0675214789db339","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY","index_tickets_on_state_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","state_id"]}}},"backtrace":["app/models/ticket.rb:439:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT DISTINCT `tickets`.* FROM `tickets` WHERE ((`tickets`.`state_id` IS NULL OR `tickets`.`state_id` NOT IN (4)) AND `tickets`.`id` IN (283)) ORDER BY `tickets`.`id` ASC LIMIT 1","table":"tickets","md5":"c1e254352bcb87744370dcc5f398edd6","messages":[{"tag":"access_type_const","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"ordering_operation":{"using_filesort":false,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"const","possible_keys":["PRIMARY","index_tickets_on_state_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}}},"backtrace":["app/models/ticket.rb:1108:in `block (2 levels) in perform_triggers'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket.rb:1011:in `block in perform_triggers'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`area` = 'Sms::Notification' LIMIT 1","table":"channels","md5":"f3abcf5abd35baf2f26833c1cf71813c","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"index_channels_on_area","index_used":["area"]},{"tag":"retsize","result_size":1,"result_bytes":340,"cost":0.0001328125}],"cost":0.00013331250000000002,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["index_channels_on_area"],"key":"index_channels_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"6K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket.rb:1551:in `send_sms_notification'","app/models/ticket.rb:955:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'","app/models/ticket.rb:1139:in `block (2 levels) in perform_triggers'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket.rb:1011:in `block in perform_triggers'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 283 ORDER BY `ticket_articles`.`created_at` DESC, `ticket_articles`.`id` DESC LIMIT 1","table":"ticket_articles","md5":"8b9c5065e8063996057cbe97175becc2","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.837500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`ticket_articles`.`ticket_id` <=> 283)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/ticket.rb:1292:in `build_notification_template_objects'","app/models/ticket.rb:1558:in `send_sms_notification'","app/models/ticket.rb:955:in `block in perform_changes'","app/models/ticket.rb:950:in `each'","app/models/ticket.rb:950:in `perform_changes'","app/models/ticket.rb:1139:in `block (2 levels) in perform_triggers'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `avatars`.* FROM `avatars` WHERE `avatars`.`object_lookup_id` = 1 AND `avatars`.`o_id` = 400","table":"avatars","md5":"b865b3294926f327a1c28e331fa40aeb","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":2.5e-07,"rows_read":1,"index":"index_avatars_on_o_id_and_object_lookup_id","index_used":["o_id","object_lookup_id"]},{"tag":"retsize","result_size":1,"result_bytes":97,"cost":3.7890625e-05}],"cost":3.8140625e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"avatars","access_type":"ref","possible_keys":["index_avatars_on_o_id_and_object_lookup_id"],"key":"index_avatars_on_o_id_and_object_lookup_id","used_key_parts":["o_id","object_lookup_id"],"key_length":"8","ref":["const","const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","o_id","object_lookup_id","default","deletable","initial","store_full_id","store_resize_id","store_hash","source","source_url","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/avatar.rb:281:in `remove'","app/models/user.rb:1216:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`user_id` = 400","table":"cti_caller_ids","md5":"c6734ef71ed3b692a295df41ca6f6552","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"fk_rails_f03ef195fa","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":28,"cost":1.09375e-05}],"cost":1.11875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["fk_rails_f03ef195fa"],"key":"fk_rails_f03ef195fa","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","caller_id","comment","level","object","o_id","user_id","preferences","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1217:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `taskbars`.* FROM `taskbars` WHERE `taskbars`.`user_id` = 400","table":"taskbars","md5":"7af5d7b6b3c1bac1102ba4be31116c1c","messages":[{"tag":"access_type_ref","table_size":3,"table":"taskbars","cost":7.5e-07,"rows_read":3,"index":"index_taskbars_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":3,"result_bytes":2055,"cost":0.0008027343750000001}],"cost":0.000803484375,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"taskbars","access_type":"ref","possible_keys":["index_taskbars_on_user_id"],"key":"index_taskbars_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"7K"},"used_columns":["id","user_id","last_contact","client_id","key","callback","state","preferences","params","prio","notify","active","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1218:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `karma_activity_logs`.* FROM `karma_activity_logs` WHERE `karma_activity_logs`.`user_id` = 400","table":"karma_activity_logs","md5":"115218f4cd2e9d2ce58d33ba369f722c","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":44,"cost":1.71875e-05}],"cost":1.74375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_user_id"],"key":"index_karma_activity_logs_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","user_id","activity_id","score","score_total","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1219:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `karma_users`.* FROM `karma_users` WHERE `karma_users`.`user_id` = 400","table":"karma_users","md5":"8459e446e4080436831f6b910b7a45db","messages":[{"tag":"access_type_const","table":"karma_users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/user.rb:1220:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `online_notifications`.* FROM `online_notifications` WHERE `online_notifications`.`user_id` = 400","table":"online_notifications","md5":"fd03d475487e3ad9ec196f1891b67680","messages":[{"tag":"access_type_ref","table_size":0,"table":"online_notifications","cost":2.5e-07,"rows_read":1,"index":"index_online_notifications_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":45,"cost":1.7578125000000002e-05}],"cost":1.7828125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"online_notifications","access_type":"ref","possible_keys":["index_online_notifications_on_user_id"],"key":"index_online_notifications_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","type_lookup_id","user_id","seen","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1221:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 400","table":"user_devices","md5":"6b827d407833d4d24f6fec64a7dcb4e5","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"]}}},"backtrace":["app/models/user_device.rb:226:in `remove'","app/models/user.rb:1223:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT `tokens`.* FROM `tokens` WHERE `tokens`.`user_id` = 400","table":"tokens","md5":"19c2c518b90355e153e00415ee242a01","messages":[{"tag":"access_type_ref","table_size":0,"table":"tokens","cost":2.5e-07,"rows_read":1,"index":"index_tokens_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":32,"cost":1.25e-05}],"cost":1.275e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_user_id"],"key":"index_tokens_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","user_id","persistent","name","action","label","preferences","last_used_at","expires_at","created_at","updated_at"]}}},"backtrace":["app/models/user.rb:1224:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `stats_stores`.* FROM `stats_stores` WHERE `stats_stores`.`stats_store_object_id` = 1 AND `stats_stores`.`o_id` = 400","table":"stats_stores","md5":"433288eff684898e19c2bb4b6dd198cd","messages":[{"tag":"access_type_ref","table_size":0,"table":"stats_stores","cost":2.5e-07,"rows_read":1,"index":"index_stats_stores_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":1,"result_bytes":40,"cost":1.5625e-05}],"cost":1.5875e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stats_stores","access_type":"ref","possible_keys":["index_stats_stores_on_o_id","index_stats_stores_on_stats_store_object_id"],"key":"index_stats_stores_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","stats_store_object_id","o_id","key","related_o_id","related_stats_store_object_id","data","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`stats_stores`.`stats_store_object_id` = 1)"}}},"backtrace":["app/models/stats_store.rb:147:in `remove'","app/models/user.rb:1225:in `destroy_longer_required_objects'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'"]},{"sql":"SELECT 1 AS one FROM `groups_users` WHERE `groups_users`.`user_id` = 5298 AND `groups_users`.`group_id` = 285 AND `groups_users`.`access` = 'full' LIMIT 1","table":"groups_users","md5":"bc9e89521b00bbfff868168ee09c9f24","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"((`zammad_development`.`groups_users`.`group_id` = 285) and (`zammad_development`.`groups_users`.`access` = 'full'))"}}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `groups`.`name`, `access` FROM `groups` INNER JOIN `groups_users` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 5336 AND `groups`.`active` = 1","table":"groups","md5":"700ca58345527a0ef0f90e2389638a10","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":2,"result_bytes":18,"cost":7.031250000000001e-06}],"cost":7.531250000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}},{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`group_id` = `zammad_development`.`groups`.`id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:211:in `groups_access_map'","app/models/concerns/has_groups.rb:149:in `group_names_access_map'","spec/models/concerns/has_groups_examples.rb:316:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `groups`.`id`, `access` FROM `groups` INNER JOIN `groups_users` ON `groups`.`id` = `groups_users`.`group_id` WHERE `groups_users`.`user_id` = 5346 AND `groups`.`active` = 1","table":"groups","md5":"de6c35bae567ee4529184557f381d3d3","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":2,"result_bytes":16,"cost":6.25e-06}],"cost":6.750000000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`groups`.`active` = 1)"}},{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`group_id` = `zammad_development`.`groups`.`id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:211:in `groups_access_map'","app/models/concerns/has_groups.rb:173:in `group_ids_access_map'","spec/models/concerns/has_groups_examples.rb:440:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT COUNT(*) FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 5352","table":"roles","md5":"42329d2ef375b0799e849a51f5331c62","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `organizations`.* FROM `organizations` INNER JOIN `organizations_users` ON `organizations`.`id` = `organizations_users`.`organization_id` WHERE `organizations_users`.`user_id` = 5352","table":"organizations","md5":"65e12aab91dafb96794d9f7184d368b7","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_ref","table_size":1000,"table":"organizations_users","cost":2.5e-07,"rows_read":1,"index":"index_organizations_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":2,"result_bytes":96,"cost":3.7500000000000003e-05}],"cost":3.8e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"organizations","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}},{"table":{"table_name":"organizations_users","access_type":"ref","possible_keys":["index_organizations_users_on_user_id","index_organizations_users_on_organization_id"],"key":"index_organizations_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"16"},"used_columns":["user_id","organization_id"],"attached_condition":"(`zammad_development`.`organizations_users`.`organization_id` = `zammad_development`.`organizations`.`id`)"}}]}},"backtrace":["app/models/application_model/can_associations.rb:191:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT COUNT(*) FROM `organizations` INNER JOIN `organizations_users` ON `organizations`.`id` = `organizations_users`.`organization_id` WHERE `organizations_users`.`user_id` = 5352","table":"organizations","md5":"2fe7fb34f7436ad0003ec6b941004aae","messages":[{"tag":"access_type_index","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"fk_rails_edec76c076","index_used":["created_by_id"]},{"tag":"access_type_ref","table_size":1000,"table":"organizations_users","cost":2.5e-07,"rows_read":1,"index":"index_organizations_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"organizations","access_type":"index","possible_keys":["PRIMARY"],"key":"fk_rails_edec76c076","used_key_parts":["created_by_id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id"]}},{"table":{"table_name":"organizations_users","access_type":"ref","possible_keys":["index_organizations_users_on_user_id","index_organizations_users_on_organization_id"],"key":"index_organizations_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"16"},"used_columns":["user_id","organization_id"],"attached_condition":"(`zammad_development`.`organizations_users`.`organization_id` = `zammad_development`.`organizations`.`id`)"}}]}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT COUNT(*) FROM `tokens` WHERE `tokens`.`user_id` = 5352","table":"tokens","md5":"a0f3f7925415bddd33f5edeeb20ca0b3","messages":[{"tag":"access_type_ref","table_size":0,"table":"tokens","cost":2.5e-07,"rows_read":1,"index":"index_tokens_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_user_id"],"key":"index_tokens_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["user_id"]}}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT COUNT(*) FROM `authorizations` WHERE `authorizations`.`user_id` = 5352","table":"authorizations","md5":"e37e3e3cca76bd408faf2d7d4f21cfb3","messages":[{"tag":"access_type_ref","table_size":0,"table":"authorizations","cost":2.5e-07,"rows_read":1,"index":"index_authorizations_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"ref","possible_keys":["index_authorizations_on_user_id"],"key":"index_authorizations_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["user_id"]}}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","spec/models/concerns/has_groups_examples.rb:515:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'"]},{"sql":"SELECT `roles_groups`.`role_id` FROM `roles_groups` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`group_id` = 367 AND `roles_groups`.`access` IN ('read', 'full') AND `roles`.`active` = 1","table":"roles_groups","md5":"72deb194d8c764839e314bc43df16492","messages":[{"tag":"access_type_ref","table_size":1000,"table":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"roles_groups","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"(`zammad_development`.`roles_groups`.`access` in ('read','full'))"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_groups.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"365"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}}]}},"backtrace":["app/models/concerns/has_roles.rb:61:in `role_access'","app/models/concerns/has_groups.rb:335:in `group_access'","spec/models/concerns/has_groups_examples.rb:551:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `users`.* FROM `users` INNER JOIN `groups_users` ON `groups_users`.`user_id` = `users`.`id` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `groups_users`.`group_id` = 367 AND `groups_users`.`access` IN ('read', 'full') AND `users`.`active` = 1 AND `roles`.`active` = 1 AND `permissions`.`name` IN ('ticket', 'ticket.agent') AND `permissions`.`active` = 1","table":"users","md5":"d5a2352bb1dda74e9e6b3f36a20be26b","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"groups_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"join_type_ref","table_size":1000,"table":"permissions_roles","join_to":"permissions","cost":5.0e-07,"rows_read":2,"index":"index_permissions_roles_on_permission_id","index_used":["permission_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_ref","table_size":1000,"table":"roles_users","join_to":"groups_users","cost":5.0e-07,"rows_read":2,"index":"index_roles_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":2,"result_bytes":2002,"cost":0.0007820312500000001}],"cost":0.00078428125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"nested_loop":[{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id","index_groups_users_on_access"],"key":"index_groups_users_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id","access"],"attached_condition":"(`zammad_development`.`groups_users`.`access` in ('read','full'))"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.groups_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}},{"table":{"table_name":"permissions","access_type":"range","possible_keys":["PRIMARY","index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":2,"rows_produced_per_join":0,"filtered":"10.00","index_condition":"(`zammad_development`.`permissions`.`name` in ('ticket','ticket.agent'))","using_join_buffer":"Block Nested Loop","cost_info":{"read_cost":"0.35","eval_cost":"0.01","prefix_cost":"1.05","data_read_per_join":"1K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_permission_id","used_key_parts":["permission_id"],"key_length":"5","ref":["zammad_development.permissions.id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","cost_info":{"read_cost":"0.01","eval_cost":"0.01","prefix_cost":"1.07","data_read_per_join":"0"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.01","eval_cost":"0.00","prefix_cost":"1.09","data_read_per_join":"19"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["zammad_development.groups_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.01","eval_cost":"0.00","prefix_cost":"1.10","data_read_per_join":"0"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`role_id` = `zammad_development`.`permissions_roles`.`role_id`)"}}]}},"backtrace":["app/models/concerns/has_groups.rb:335:in `group_access'","spec/models/concerns/has_groups_examples.rb:551:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT 1 AS one FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_groups`.`role_id` WHERE `roles_groups`.`role_id` IN (2, 3114) AND `roles_groups`.`group_id` = 378 AND `roles_groups`.`access` IN ('read', 'full') AND `groups`.`active` = 1 AND `roles`.`active` = 1 LIMIT 1","table":"roles_groups","md5":"d7a9a12711ce5157ffec5a2b75e3fb2b","messages":[{"tag":"access_type_const","table":"roles_groups"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_roles.rb:26:in `role_access?'","app/models/concerns/has_groups.rb:87:in `group_access?'","spec/models/concerns/has_roles_examples.rb:55:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT DISTINCT `users`.* FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `users`.`active` = 1 AND `roles_users`.`role_id` = 3125","table":"users","md5":"225638961874556fc54a2bb95a65b315","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/concerns/has_roles.rb:63:in `role_access'","app/models/concerns/has_roles.rb:82:in `role_access_ids'","spec/models/concerns/has_roles_examples.rb:85:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'"]},{"sql":"SELECT `roles_groups`.`group_id` FROM `roles_groups` LEFT OUTER JOIN `groups` ON `groups`.`id` = `roles_groups`.`group_id` WHERE `roles_groups`.`role_id` IN (2, 3136, 3136) AND `roles_groups`.`access` IN ('read', 'full') AND `groups`.`active` = 1","table":"roles_groups","md5":"7292ed5a599bf34bf23aac41ed83f5d7","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"join_type_ref","table_size":1000,"table":"roles_groups","join_to":"groups","cost":2.5e-07,"rows_read":1,"index":"index_roles_groups_on_group_id","index_used":["group_id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.0625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","active"],"attached_condition":"((`zammad_development`.`groups`.`active` = 1) and (`zammad_development`.`groups`.`id` is not null))"}},{"table":{"table_name":"roles_groups","access_type":"ref","possible_keys":["index_roles_groups_on_role_id","index_roles_groups_on_group_id","index_roles_groups_on_access"],"key":"index_roles_groups_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["zammad_development.groups.id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"160"},"used_columns":["role_id","group_id","access"],"attached_condition":"((`zammad_development`.`roles_groups`.`role_id` in (2,3136,3136)) and (`zammad_development`.`roles_groups`.`access` in ('read','full')))"}}]}},"backtrace":["app/models/concerns/has_groups.rb:117:in `group_ids_access'","spec/models/concerns/has_roles_examples.rb:151:in `block (5 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `roles`.id AS `roles`, `organizations`.id AS `organizations`, `tokens`.id AS `tokens`, `authorizations`.id AS `authorizations` FROM `users` LEFT OUTER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` LEFT OUTER JOIN `organizations_users` ON `organizations_users`.`user_id` = `users`.`id` LEFT OUTER JOIN `organizations` ON `organizations`.`id` = `organizations_users`.`organization_id` LEFT OUTER JOIN `tokens` ON `tokens`.`user_id` = `users`.`id` LEFT OUTER JOIN `authorizations` ON `authorizations`.`user_id` = `users`.`id` WHERE `users`.`id` IS NULL","table":"users","md5":"5a0d2b80d25c032819a2562a2b78c2dd","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","spec/models/concerns/has_groups_permissions_examples.rb:50:in `block (4 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:464:in `block in run'","gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'"]},{"sql":"SELECT `permissions`.`preferences` FROM `permissions` INNER JOIN `permissions_roles` ON `permissions_roles`.`permission_id` = `permissions`.`id` INNER JOIN `roles` ON `roles`.`id` = `permissions_roles`.`role_id` WHERE (roles.id IN (3145) AND roles.active = 1 AND (permissions.name IN ('admin','admin.%') OR permissions.name LIKE 'admin.%') AND permissions.active = 1)","table":"permissions","md5":"d015300b454bba3d477060e970d4a757","messages":[{"tag":"access_type_const","table":"permissions"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/user.rb:455:in `block in permissions?'","app/models/user.rb:450:in `each'","app/models/user.rb:450:in `permissions?'","app/models/user/checks_access.rb:43:in `readable_by?'","app/models/user/checks_access.rb:20:in `access?'","spec/models/user_spec.rb:183:in `block (7 levels) in <top (required)>'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'","gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'"]},{"sql":"SELECT `cti_caller_ids`.* FROM `cti_caller_ids` WHERE `cti_caller_ids`.`id` = 32 LIMIT 1","table":"cti_caller_ids","md5":"24aef0445b3dc014d354ba520d66ed96","messages":[{"tag":"access_type_const","table":"cti_caller_ids"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/cti/caller_id.rb:149:in `block in build_item'","app/models/cti/caller_id.rb:148:in `each'","app/models/cti/caller_id.rb:148:in `build_item'","app/models/cti/caller_id.rb:85:in `build'","app/models/user.rb:1271:in `update_caller_id'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:511:in `block in invoke_after'"]},{"sql":"SELECT COUNT(DISTINCT `users`.`id`) FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles`.`id` = 2 AND `users`.`active` = 1","table":"users","md5":"c838abab075240039a52a6e68be93e72","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"roles_users","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.0e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`user_id` is not null)"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}}]}},"backtrace":["app/models/user.rb:1134:in `validate_agent_limit_by_role'","gems/activerecord-5.1.6.1/lib/active_record/associations/builder/collection_association.rb:39:in `block (2 levels) in define_callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:464:in `block in callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `each'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:441:in `replace_on_target'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:281:in `add_to_target'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:432:in `block in concat_records'"]},{"sql":"SELECT `groups`.* FROM `groups` WHERE `groups`.`name` = 'Users'","table":"groups","md5":"5a73b69a8e68b9624f3a4e050687461f","messages":[{"tag":"access_type_const","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"index_groups_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"groups","access_type":"const","possible_keys":["index_groups_on_name"],"key":"index_groups_on_name","used_key_parts":["name"],"key_length":"482","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/application_model/can_associations.rb:378:in `block in association_name_to_id_convert'","app/models/application_model/can_associations.rb:351:in `map'","app/models/application_model/can_associations.rb:351:in `association_name_to_id_convert'","app/controllers/tickets_controller.rb:88:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'"]},{"sql":"SELECT `permissions`.`id` FROM `permissions` WHERE (permissions.active = 1 AND (permissions.name = 'user_preferences' OR permissions.name LIKE 'user_preferences.%' OR permissions.name = 'admin' OR permissions.name LIKE 'admin.%' OR permissions.name = 'report' OR permissions.name LIKE 'report.%' OR permissions.name = 'ticket.agent' OR permissions.name LIKE 'ticket.agent.%' OR permissions.name = 'chat.agent' OR permissions.name LIKE 'chat.agent.%' OR permissions.name = 'cti.agent' OR permissions.name LIKE 'cti.agent.%'))","table":"permissions","md5":"f190a0e2d896e11f203df7c532a21310","messages":[{"tag":"access_type_tablescan","table_size":52,"table":"permissions","cost":1.3e-05,"rows_read":52,"index":null,"index_used":null},{"tag":"retsize","result_size":52,"result_bytes":208,"cost":8.125000000000001e-05}],"cost":9.425000000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"5.45"},"table":{"table_name":"permissions","access_type":"ALL","possible_keys":["index_permissions_on_name"],"rows_examined_per_scan":52,"rows_produced_per_join":5,"filtered":"10.00","cost_info":{"read_cost":"4.93","eval_cost":"0.52","prefix_cost":"5.45","data_read_per_join":"164K"},"used_columns":["id","name","active"],"attached_condition":"((`zammad_development`.`permissions`.`active` = 1) and ((`zammad_development`.`permissions`.`name` = 'user_preferences') or (`zammad_development`.`permissions`.`name` like 'user_preferences.%') or (`zammad_development`.`permissions`.`name` = 'admin') or (`zammad_development`.`permissions`.`name` like 'admin.%') or (`zammad_development`.`permissions`.`name` = 'report') or (`zammad_development`.`permissions`.`name` like 'report.%') or (`zammad_development`.`permissions`.`name` = 'ticket.agent') or (`zammad_development`.`permissions`.`name` like 'ticket.agent.%') or (`zammad_development`.`permissions`.`name` = 'chat.agent') or (`zammad_development`.`permissions`.`name` like 'chat.agent.%') or (`zammad_development`.`permissions`.`name` = 'cti.agent') or (`zammad_development`.`permissions`.`name` like 'cti.agent.%')))"}}},"backtrace":["app/models/user.rb:492:in `permissions_with_child_ids'","app/models/activity_stream.rb:112:in `list'","app/models/user.rb:245:in `activity_stream'","app/controllers/activity_stream_controller.rb:8:in `show'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT `activity_streams`.* FROM `activity_streams` WHERE ((permission_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,50,52) AND group_id is NULL) OR (permission_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,50,52) AND group_id IN (1,16,17,18,19,20,21,22)) OR (permission_id is NULL AND group_id IN (1,16,17,18,19,20,21,22))) ORDER BY created_at DESC, id DESC","table":"activity_streams","md5":"f05d9b0b95eaf38ca47dcb90b00271df","messages":[{"tag":"access_type_tablescan","table_size":6,"table":"activity_streams","cost":1.5e-06,"rows_read":6,"index":null,"index_used":null},{"tag":"retsize","result_size":6,"result_bytes":264,"cost":0.000103125}],"cost":0.000104625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"7.60"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"6.00"},"table":{"table_name":"activity_streams","access_type":"ALL","possible_keys":["index_activity_streams_on_permission_id","index_activity_streams_on_group_id"],"rows_examined_per_scan":6,"rows_produced_per_join":6,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.60","prefix_cost":"1.60","data_read_per_join":"288"},"used_columns":["id","activity_stream_type_id","activity_stream_object_id","permission_id","group_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`activity_streams`.`permission_id` in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,50,52)) and isnull(`zammad_development`.`activity_streams`.`group_id`)) or ((`zammad_development`.`activity_streams`.`permission_id` in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,50,52)) and (`zammad_development`.`activity_streams`.`group_id` in (1,16,17,18,19,20,21,22))) or (isnull(`zammad_development`.`activity_streams`.`permission_id`) and (`zammad_development`.`activity_streams`.`group_id` in (1,16,17,18,19,20,21,22))))"}}}},"backtrace":["app/controllers/activity_stream_controller.rb:22:in `show'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `sessions`.* FROM `sessions` ORDER BY updated_at DESC LIMIT 10000","table":"sessions","md5":"2f7657561030ed003f10b28253dee68f","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"sessions","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":741,"cost":0.000289453125}],"cost":0.000289703125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"sessions","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"800"},"used_columns":["id","session_id","persistent","data","created_at","updated_at"]}}}},"backtrace":["app/controllers/sessions_controller.rb:289:in `list'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE (group_id IN (NULL)) ORDER BY `tickets`.`id` ASC LIMIT 100 OFFSET 0","table":"tickets","md5":"f25c21415589381f7ac82f84ca88e577","messages":[{"tag":"access_type_const","table":"tickets"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/tickets_controller.rb:52:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE (tickets.customer_id = 5507) ORDER BY `tickets`.`id` ASC LIMIT 100 OFFSET 0","table":"tickets","md5":"6c7df6131e5dca84136249800abb604c","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.251562500000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 5507)","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/tickets_controller.rb:52:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `tokens`.* FROM `tokens` WHERE `tokens`.`name` = '5qSZG387YtEsDS5ARmcj0sCWgIjN1vaRj5brpA-1ADZ9foGZ5e20Da9HYPGDgmlf' LIMIT 1","table":"tokens","md5":"8fc6f6d99aac60d0ba81a69da9dea1e5","messages":[{"tag":"access_type_ref","table_size":0,"table":"tokens","cost":2.5e-07,"rows_read":1,"index":"index_tokens_on_name_and_action","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":32,"cost":1.25e-05}],"cost":1.275e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_name_and_action"],"key":"index_tokens_on_name_and_action","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","user_id","persistent","name","action","label","preferences","last_used_at","expires_at","created_at","updated_at"]}}},"backtrace":["app/controllers/application_controller/authenticates.rb:102:in `block in authentication_check_only'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:444:in `authenticate'","gems/actionpack-5.1.6.1/lib/action_controller/metal/http_authentication.rb:419:in `authenticate_with_http_token'","app/controllers/application_controller/authenticates.rb:79:in `authentication_check_only'","app/controllers/application_controller/authenticates.rb:28:in `authentication_check'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:178:in `block (2 levels) in halting_and_conditional'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:12:in `block (2 levels) in <module:Callbacks>'"]},{"sql":"SELECT `roles`.* FROM `roles` ORDER BY `roles`.`id` ASC LIMIT 18446744073709551615 OFFSET 0","table":"roles","md5":"1a8eca2b153c3214f3ea312cdaf148d2","messages":[{"tag":"limited_scan","cost":7.5e-07,"table":"roles","rows_read":3},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"roles","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"3K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/application_controller/renders_models.rb:145:in `model_index_render'","app/controllers/roles_controller.rb:49:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` ORDER BY `organizations`.`id` ASC LIMIT 500 OFFSET 0","table":"organizations","md5":"81262a408cf860bfaf7fa4f1d6b4f034","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"organizations","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"organizations","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/organizations_controller.rb:96:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`id` = 20 LIMIT 1 FOR UPDATE","table":"organizations","md5":"7e12df7491884470ec313c37d7d9a452","messages":[{"tag":"access_type_const","table":"organizations"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/application_controller/renders_models.rb:46:in `model_update_render'","app/controllers/organizations_controller.rb:203:in `update'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `ticket_state_types`.* FROM `ticket_state_types`","table":"ticket_state_types","md5":"93e77d03d487af308514b43ad6716ee0","messages":[{"tag":"access_type_tablescan","table_size":7,"table":"ticket_state_types","cost":1.75e-06,"rows_read":7,"index":null,"index_used":null},{"tag":"retsize","result_size":7,"result_bytes":252,"cost":9.84375e-05}],"cost":0.0001001875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.95"},"table":{"table_name":"ticket_state_types","access_type":"ALL","rows_examined_per_scan":7,"rows_produced_per_join":7,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.70","prefix_cost":"0.95","data_read_per_join":"10K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_ticket.rb:12:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `ticket_states`.id AS `states` FROM `ticket_state_types` LEFT OUTER JOIN `ticket_states` ON `ticket_states`.`state_type_id` = `ticket_state_types`.`id` WHERE `ticket_state_types`.`id` = 1","table":"ticket_state_types","md5":"da4dd11d9540a0c6fb3e6423c3b69b9f","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_state_types","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0853e2d094","index_used":["state_type_id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":3.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"nested_loop":[{"table":{"table_name":"ticket_state_types","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["fk_rails_0853e2d094"],"key":"fk_rails_0853e2d094","used_key_parts":["state_type_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","state_type_id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/application_model/can_assets.rb:31:in `assets'","app/controllers/sessions/collection_ticket.rb:13:in `block in session'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/controllers/sessions/collection_ticket.rb:12:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'"]},{"sql":"SELECT `ticket_article_senders`.* FROM `ticket_article_senders`","table":"ticket_article_senders","md5":"638f3607119d622f43941a51c67fd74b","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_article_senders","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":102,"cost":3.984375e-05}],"cost":4.059375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"ticket_article_senders","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"4K"},"used_columns":["id","name","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_ticket.rb:28:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `signatures`.* FROM `signatures`","table":"signatures","md5":"50ad6b9cbf0c24560e748750cf2e2309","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":357,"cost":0.000139453125}],"cost":0.00013970312500000002,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"signatures","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","body","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_ticket.rb:35:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `groups`.id AS `groups` FROM `signatures` LEFT OUTER JOIN `groups` ON `groups`.`signature_id` = `signatures`.`id` WHERE `signatures`.`id` = 1","table":"signatures","md5":"471e1ee47f9494fa3cfebbc5d22f6cb7","messages":[{"tag":"access_type_const","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_5538295cdc","index_used":["signature_id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":3.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"nested_loop":[{"table":{"table_name":"signatures","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_5538295cdc"],"key":"fk_rails_5538295cdc","used_key_parts":["signature_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/application_model/can_assets.rb:31:in `assets'","app/controllers/sessions/collection_ticket.rb:36:in `block in session'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/controllers/sessions/collection_ticket.rb:35:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'"]},{"sql":"SELECT `groups`.id AS `groups` FROM `email_addresses` LEFT OUTER JOIN `groups` ON `groups`.`email_address_id` = `email_addresses`.`id` WHERE `email_addresses`.`id` = 15","table":"email_addresses","md5":"dec5a8c36b59f945f484cfe1fb977a3b","messages":[{"tag":"access_type_const","table":"email_addresses"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/application_model/can_assets.rb:31:in `assets'","app/controllers/sessions/collection_ticket.rb:42:in `block in session'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/controllers/sessions/collection_ticket.rb:41:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'"]},{"sql":"SELECT `online_notifications`.* FROM `online_notifications` WHERE `online_notifications`.`user_id` = 5514 ORDER BY created_at DESC, id DESC LIMIT 200","table":"online_notifications","md5":"f3699fc8754fff72c1ea9e7c57342f81","messages":[{"tag":"access_type_ref","table_size":0,"table":"online_notifications","cost":2.5e-07,"rows_read":1,"index":"index_online_notifications_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":45,"cost":1.7578125000000002e-05}],"cost":1.7828125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"online_notifications","access_type":"ref","possible_keys":["index_online_notifications_on_user_id"],"key":"index_online_notifications_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`online_notifications`.`user_id` <=> 5514)","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"48"},"used_columns":["id","o_id","object_lookup_id","type_lookup_id","user_id","seen","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/sessions/collection_base.rb:15:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `permissions`.* FROM `permissions`","table":"permissions","md5":"7cd0fa989abe48437b64a45bab762f38","messages":[{"tag":"access_type_tablescan","table_size":52,"table":"permissions","cost":1.3e-05,"rows_read":52,"index":null,"index_used":null},{"tag":"retsize","result_size":52,"result_bytes":6864,"cost":0.00268125}],"cost":0.00269425,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"5.45"},"table":{"table_name":"permissions","access_type":"ALL","rows_examined_per_scan":52,"rows_produced_per_join":52,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"5.20","prefix_cost":"5.45","data_read_per_join":"1M"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_base.rb:25:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `roles`.id AS `roles` FROM `permissions` LEFT OUTER JOIN `permissions_roles` ON `permissions_roles`.`permission_id` = `permissions`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `permissions_roles`.`role_id` WHERE `permissions`.`id` = 1","table":"permissions","md5":"d5b8d56d3cb80fe0d7dc91139a3a1f70","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"permissions_roles","cost":2.5e-07,"rows_read":1,"index":"index_permissions_roles_on_permission_id","index_used":["permission_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"permissions_roles","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":8,"cost":3.125e-06}],"cost":4.125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"permissions","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id"]}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_permission_id","used_key_parts":["permission_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["role_id","permission_id"]}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"1K"},"used_columns":["id"]}}]}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/models/application_model/can_assets.rb:31:in `assets'","app/controllers/sessions/collection_base.rb:26:in `block in session'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/controllers/sessions/collection_base.rb:25:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'"]},{"sql":"SELECT `roles`.* FROM `roles`","table":"roles","md5":"a9012f5459b3f2000bf99c9deb7bf00f","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"roles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"retsize","result_size":3,"result_bytes":408,"cost":0.000159375}],"cost":0.000160125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"table":{"table_name":"roles","access_type":"ALL","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"3K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_base.rb:30:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `groups`.* FROM `groups`","table":"groups","md5":"4c82b66ab2d2c8c4ef13647fe4cfc448","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":82,"cost":3.203125e-05}],"cost":3.228125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/sessions/collection_base.rb:35:in `session'","lib/session_helper.rb:12:in `block in default_collections'","lib/session_helper.rb:10:in `each'","lib/session_helper.rb:10:in `default_collections'","app/controllers/sessions_controller.rb:43:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` WHERE `object_manager_attributes`.`object_lookup_id` = 2 AND `object_manager_attributes`.`active` = 1 AND `object_manager_attributes`.`to_create` = 0 AND `object_manager_attributes`.`to_delete` = 0 ORDER BY position ASC, name ASC","table":"object_manager_attributes","md5":"b8f70131f3243485148efc263f7b72f6","messages":[{"tag":"access_type_ref","table_size":48,"table":"object_manager_attributes","cost":2.25e-06,"rows_read":9,"index":"index_object_manager_attributes_on_object_lookup_id_and_name","index_used":["object_lookup_id"]},{"tag":"retsize","result_size":9,"result_bytes":6093,"cost":0.0023800781250000002}],"cost":0.0023823281250000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.10"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"object_manager_attributes","access_type":"ref","possible_keys":["index_object_manager_attributes_on_object_lookup_id_and_name","index_object_manager_attributes_on_object_lookup_id"],"key":"index_object_manager_attributes_on_object_lookup_id_and_name","used_key_parts":["object_lookup_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":9,"rows_produced_per_join":0,"filtered":"2.08","index_condition":"(`zammad_development`.`object_manager_attributes`.`object_lookup_id` <=> 2)","cost_info":{"read_cost":"1.20","eval_cost":"0.02","prefix_cost":"2.10","data_read_per_join":"1K"},"used_columns":["id","object_lookup_id","name","display","data_type","data_option","data_option_new","editable","active","screens","to_create","to_migrate","to_delete","to_config","position","created_by_id","updated_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`object_manager_attributes`.`to_delete` = 0) and (`zammad_development`.`object_manager_attributes`.`to_create` = 0) and (`zammad_development`.`object_manager_attributes`.`active` = 1))"}}}},"backtrace":["app/models/object_manager/attribute.rb:486:in `by_object'","lib/session_helper.rb:22:in `block in models'","lib/session_helper.rb:21:in `each'","lib/session_helper.rb:21:in `models'","app/controllers/sessions_controller.rb:46:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT name, preferences FROM `settings` WHERE `settings`.`frontend` = 1","table":"settings","md5":"b54a3c1491264a702c3e9e72bf338ce6","messages":[{"tag":"access_type_ref","table_size":201,"table":"settings","cost":2.525e-05,"rows_read":101,"index":"index_settings_on_frontend","index_used":["frontend"]},{"tag":"retsize","result_size":101,"result_bytes":13029,"cost":0.005089453125000001}],"cost":0.005114703125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"11.42"},"table":{"table_name":"settings","access_type":"ref","possible_keys":["index_settings_on_frontend"],"key":"index_settings_on_frontend","used_key_parts":["frontend"],"key_length":"1","ref":["const"],"rows_examined_per_scan":64,"rows_produced_per_join":64,"filtered":"100.00","cost_info":{"read_cost":"5.03","eval_cost":"6.40","prefix_cost":"11.43","data_read_per_join":"1M"},"used_columns":["name","frontend","preferences"]}}},"backtrace":["app/controllers/sessions_controller.rb:318:in `config_frontend'","app/controllers/sessions_controller.rb:56:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `locales`.* FROM `locales` WHERE `locales`.`active` = 1","table":"locales","md5":"9a46786d0883fbd34dfd09443e8905ed","messages":[{"tag":"access_type_tablescan","table_size":38,"table":"locales","cost":9.499999999999999e-06,"rows_read":38,"index":null,"index_used":null},{"tag":"retsize","result_size":38,"result_bytes":1596,"cost":0.0006234375000000001}],"cost":0.0006329375,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"table":{"table_name":"locales","access_type":"ALL","rows_examined_per_scan":38,"rows_produced_per_join":3,"filtered":"10.00","cost_info":{"read_cost":"3.67","eval_cost":"0.38","prefix_cost":"4.05","data_read_per_join":"3K"},"used_columns":["id","locale","alias","name","dir","active","created_at","updated_at"],"attached_condition":"(`zammad_development`.`locales`.`active` = 1)"}}},"backtrace":["app/controllers/sessions_controller.rb:53:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `calendars`.* FROM `calendars` ORDER BY `calendars`.`id` ASC LIMIT 18446744073709551615 OFFSET 0","table":"calendars","md5":"ebd3488c98c6000ae3a6ed85ade27ead","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"calendars","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"calendars","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/application_controller/renders_models.rb:145:in `model_index_render'","app/controllers/calendars_controller.rb:26:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `calendars`.* FROM `calendars` ORDER BY `calendars`.`name` ASC, `calendars`.`created_at` ASC","table":"calendars","md5":"a39a190f061efcdb086c47dfd4854be5","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":10757,"cost":0.004201953125}],"cost":0.004202203125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.60"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"calendars","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/calendars_controller.rb:10:in `init'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `external_credentials`.* FROM `external_credentials` ORDER BY `external_credentials`.`id` ASC LIMIT 18446744073709551615 OFFSET 0","table":"external_credentials","md5":"451aaa36d0a9e2b376521a269d4744a3","messages":[{"tag":"limited_scan","cost":0.0,"table":"external_credentials","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"external_credentials","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["id","name","credentials","created_at","updated_at"]}}}},"backtrace":["app/controllers/application_controller/renders_models.rb:145:in `model_index_render'","app/controllers/external_credentials_controller.rb:7:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `external_credentials`.* FROM `external_credentials` WHERE `external_credentials`.`name` = 'facebook' LIMIT 1","table":"external_credentials","md5":"615cdc6b32638a530b51da9e4d4abf6c","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"external_credentials","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"external_credentials","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["id","name","credentials","created_at","updated_at"],"attached_condition":"(`zammad_development`.`external_credentials`.`name` = 'facebook')"}}},"backtrace":["lib/external_credential/facebook.rb:9:in `request_account_to_link'","lib/external_credential/facebook.rb:4:in `app_verify'","app/models/external_credential.rb:9:in `app_verify'","app/controllers/external_credentials_controller.rb:27:in `app_verify'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT `chat_sessions`.`id` FROM `chat_sessions` ORDER BY created_at DESC","table":"chat_sessions","md5":"3fb0cb1f3ce446441a99b08969979e0d","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"chat_sessions","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"chat_sessions","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `cti_logs`.`id` FROM `cti_logs` ORDER BY created_at DESC","table":"cti_logs","md5":"677b329f2af7da4228cc2e8fd7623deb","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"cti_logs","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"cti_logs","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"5K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `stats_stores`.`id` FROM `stats_stores` ORDER BY created_at DESC","table":"stats_stores","md5":"049dbaf3ee7a01b1f1c84f4e2505a850","messages":[{"tag":"access_type_index","table_size":0,"table":"stats_stores","cost":0.0,"rows_read":0,"index":"index_stats_stores_on_created_at","index_used":["created_at"]},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"stats_stores","access_type":"index","key":"index_stats_stores_on_created_at","used_key_parts":["created_at"],"key_length":"5","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","backward_index_scan":true,"using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `organizations`.`id` FROM `organizations` ORDER BY created_at DESC","table":"organizations","md5":"a8ef95ca300c714118a3feec86019a08","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`organization_id` = 1","table":"users","md5":"c17bcb01a7f6cf9bbf3b4cfd2aaab69c","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.0062499999999999995,"rows_read":25000,"index":"index_users_on_organization_id","index_used":["organization_id"]},{"tag":"retsize","result_size":25000,"result_bytes":25025000,"cost":9.775390625}],"cost":9.781640625,"severity":"high","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_organization_id"],"key":"index_users_on_organization_id","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/organization/search_index.rb:26:in `search_index_attribute_lookup'","app/models/concerns/has_search_index_backend.rb:62:in `search_index_update_backend'","app/models/concerns/has_search_index_backend.rb:139:in `block in search_index_reload'","app/models/concerns/has_search_index_backend.rb:134:in `each'","app/models/concerns/has_search_index_backend.rb:134:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` ORDER BY created_at DESC","table":"tickets","md5":"79475a0bbadb1feca350d9177f71a433","messages":[{"tag":"access_type_index","table_size":1000000,"table":"tickets","cost":0.25,"rows_read":1000000,"index":"index_tickets_on_created_at","index_used":["created_at"]},{"tag":"retsize","result_size":1000000,"result_bytes":4000000,"cost":1.5625}],"cost":1.8125,"severity":"high","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"83896.93"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"index","key":"index_tickets_on_created_at","used_key_parts":["created_at"],"key_length":"5","rows_examined_per_scan":779064,"rows_produced_per_join":779064,"filtered":"100.00","backward_index_scan":true,"using_index":true,"cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `tags`.* FROM `tags` WHERE `tags`.`tag_object_id` = 1 AND `tags`.`o_id` = 1 ORDER BY `tags`.`id` ASC","table":"tags","md5":"1c9a58ba15a0d02793d8370fee2b3038","messages":[{"tag":"access_type_ref","table_size":1,"table":"tags","cost":2.5e-07,"rows_read":1,"index":"index_tags_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tags","access_type":"ref","possible_keys":["index_tags_on_o_id","index_tags_on_tag_object_id"],"key":"index_tags_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tags`.`o_id` <=> 1)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["id","tag_item_id","tag_object_id","o_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tags`.`tag_object_id` = 1)"}}}},"backtrace":["app/models/tag.rb:156:in `each_with_object'","app/models/tag.rb:156:in `tag_list'","app/models/concerns/has_tags.rb:55:in `tag_list'","app/models/ticket/search_index.rb:24:in `search_index_attribute_lookup'","app/models/concerns/has_search_index_backend.rb:62:in `search_index_update_backend'","app/models/concerns/has_search_index_backend.rb:139:in `block in search_index_reload'","app/models/concerns/has_search_index_backend.rb:134:in `each'","app/models/concerns/has_search_index_backend.rb:134:in `search_index_reload'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 1 LIMIT 1000","table":"ticket_articles","md5":"449e117cf38537d7a4c615caf9d4f403","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.837500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}},"backtrace":["app/models/ticket/search_index.rb:40:in `search_index_attribute_lookup'","app/models/concerns/has_search_index_backend.rb:62:in `search_index_update_backend'","app/models/concerns/has_search_index_backend.rb:139:in `block in search_index_reload'","app/models/concerns/has_search_index_backend.rb:134:in `each'","app/models/concerns/has_search_index_backend.rb:134:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `users`.`id` FROM `users` ORDER BY created_at DESC","table":"users","md5":"9c480df2f0c2683f0341d02f06365324","messages":[{"tag":"access_type_tablescan","table_size":100000,"table":"users","cost":0.024999999999999998,"rows_read":100000,"index":null,"index_used":null},{"tag":"retsize","result_size":100000,"result_bytes":400000,"cost":0.15625}],"cost":0.18125,"severity":"medium","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.65"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"4.00"},"table":{"table_name":"users","access_type":"ALL","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.40","prefix_cost":"0.65","data_read_per_join":"185K"},"used_columns":["id","created_at"]}}}},"backtrace":["app/models/concerns/has_search_index_backend.rb:133:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'","lib/tasks/search_index_es.rake:133:in `block (2 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'","gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'","lib/tasks/search_index_es.rake:148:in `block (2 levels) in <top (required)>'"]},{"sql":"SELECT `permissions`.`id` FROM `permissions` WHERE (permissions.active = 1 AND (permissions.name = 'user_preferences.password' OR permissions.name LIKE 'user_preferences.password.%' OR permissions.name = 'user_preferences.language' OR permissions.name LIKE 'user_preferences.language.%' OR permissions.name = 'user_preferences.linked_accounts' OR permissions.name LIKE 'user_preferences.linked_accounts.%' OR permissions.name = 'user_preferences.avatar' OR permissions.name LIKE 'user_preferences.avatar.%' OR permissions.name = 'ticket.customer' OR permissions.name LIKE 'ticket.customer.%'))","table":"permissions","md5":"245acfc413ba097a923fe84fc09552d0","messages":[{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"6.16"},"table":{"table_name":"permissions","access_type":"range","possible_keys":["index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":12,"rows_produced_per_join":1,"filtered":"10.00","index_condition":"((`zammad_development`.`permissions`.`name` = 'user_preferences.password') or (`zammad_development`.`permissions`.`name` like 'user_preferences.password.%') or (`zammad_development`.`permissions`.`name` = 'user_preferences.language') or (`zammad_development`.`permissions`.`name` like 'user_preferences.language.%') or (`zammad_development`.`permissions`.`name` = 'user_preferences.linked_accounts') or (`zammad_development`.`permissions`.`name` like 'user_preferences.linked_accounts.%') or (`zammad_development`.`permissions`.`name` = 'user_preferences.avatar') or (`zammad_development`.`permissions`.`name` like 'user_preferences.avatar.%') or (`zammad_development`.`permissions`.`name` = 'ticket.customer') or (`zammad_development`.`permissions`.`name` like 'ticket.customer.%'))","cost_info":{"read_cost":"6.04","eval_cost":"0.12","prefix_cost":"6.16","data_read_per_join":"37K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}}},"backtrace":["app/models/user.rb:492:in `permissions_with_child_ids'","app/models/user/search_index.rb:24:in `search_index_attribute_lookup'","app/models/concerns/has_search_index_backend.rb:62:in `search_index_update_backend'","app/models/concerns/has_search_index_backend.rb:139:in `block in search_index_reload'","app/models/concerns/has_search_index_backend.rb:134:in `each'","app/models/concerns/has_search_index_backend.rb:134:in `search_index_reload'","lib/tasks/search_index_es.rake:137:in `block (3 levels) in <top (required)>'","lib/tasks/search_index_es.rake:133:in `each'"]},{"sql":"SELECT `permissions`.* FROM `permissions` WHERE `permissions`.`id` = 48 LIMIT 1","table":"permissions","md5":"f335240c5cb9125ac84033361a217908","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"permissions","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/user/search_index.rb:25:in `block in search_index_attribute_lookup'","app/models/user/search_index.rb:24:in `each'","app/models/user/search_index.rb:24:in `search_index_attribute_lookup'","app/models/concerns/has_search_index_backend.rb:62:in `search_index_update_backend'","app/models/concerns/has_search_index_backend.rb:139:in `block in search_index_reload'","app/models/concerns/has_search_index_backend.rb:134:in `each'"]},{"sql":"SELECT `tickets`.`id` FROM `tickets` WHERE `tickets`.`state_id` IN (SELECT `ticket_states`.`id` FROM `ticket_states` WHERE `ticket_states`.`state_type_id` IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE `ticket_state_types`.`name` IN ('new', 'open', 'pending reminder', 'pending action'))) ORDER BY `tickets`.`created_at` DESC LIMIT 5000","table":"tickets","md5":"4517e4886b2debf896c09528066d4b4f","messages":[{"tag":"access_type_index","table_size":1000000,"table":"tickets","cost":0.25,"rows_read":1000000,"index":"index_tickets_on_created_at","index_used":["created_at"]},{"tag":"join_type_eq_ref","table_size":7,"table":"ticket_states","join_to":"tickets","cost":1.75e-06,"rows_read":7,"index":"PRIMARY","index_used":["id"]},{"tag":"join_type_eq_ref","table_size":7,"table":"ticket_state_types","join_to":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":5000,"result_bytes":20000,"cost":0.0078125}],"cost":0.25781600000000005,"severity":"medium","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"-2487014.27"},"ordering_operation":{"using_filesort":false,"nested_loop":[{"table":{"table_name":"tickets","access_type":"index","possible_keys":["index_tickets_on_state_id"],"key":"index_tickets_on_created_at","used_key_parts":["created_at"],"key_length":"5","rows_examined_per_scan":8749,"rows_produced_per_join":779064,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id","state_id","created_at"]}},{"table":{"table_name":"ticket_states","access_type":"eq_ref","possible_keys":["PRIMARY","fk_rails_0853e2d094"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.tickets.state_id"],"rows_examined_per_scan":1,"rows_produced_per_join":779064,"filtered":"100.00","cost_info":{"read_cost":"194766.00","eval_cost":"77906.40","prefix_cost":"356569.33","data_read_per_join":"1G"},"used_columns":["id","state_type_id"]}},{"table":{"table_name":"ticket_state_types","access_type":"eq_ref","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_states.state_type_id"],"rows_examined_per_scan":1,"rows_produced_per_join":445179,"filtered":"57.14","cost_info":{"read_cost":"194766.00","eval_cost":"44517.94","prefix_cost":"629241.73","data_read_per_join":"652M"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`ticket_state_types`.`name` in ('new','open','pending reminder','pending action'))"}}]}}},"backtrace":["app/controllers/integration/check_mk_controller.rb:26:in `update'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT MAX(id) as caller_id FROM `cti_caller_ids` WHERE 1=0 AND `cti_caller_ids`.`level` = 'known' GROUP BY `cti_caller_ids`.`user_id` ORDER BY caller_id DESC LIMIT 20","table":"cti_caller_ids","md5":"930cb332e03e6e3c277c12f1ca175bad","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/cti/caller_id.rb:61:in `map'","app/models/cti/caller_id.rb:61:in `block in lookup'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `find'","app/models/cti/caller_id.rb:62:in `lookup'"]},{"sql":"SELECT MAX(id) as caller_id FROM `cti_caller_ids` WHERE 1=0 GROUP BY `cti_caller_ids`.`user_id` ORDER BY caller_id DESC LIMIT 20","table":"cti_caller_ids","md5":"6e63725682478d9076069b6d22492a7c","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/cti/caller_id.rb:61:in `map'","app/models/cti/caller_id.rb:61:in `block in lookup'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `each'","app/models/cti/caller_id.rb:62:in `find'","app/models/cti/caller_id.rb:62:in `lookup'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`active` = 1","table":"channels","md5":"e178fb0d6c82a88575ab10721cf8a8ed","messages":[{"tag":"access_type_tablescan","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":null,"index_used":null},{"tag":"retsize","result_size":2,"result_bytes":680,"cost":0.000265625}],"cost":0.00026612500000000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.45"},"table":{"table_name":"channels","access_type":"ALL","rows_examined_per_scan":2,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"0.35","eval_cost":"0.10","prefix_cost":"0.45","data_read_per_join":"6K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`channels`.`active` = 1)"}}},"backtrace":["app/controllers/monitoring_controller.rb:37:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `schedulers`.* FROM `schedulers` WHERE (active = 1 AND period > 300) AND (`schedulers`.`last_run` IS NOT NULL) ORDER BY `schedulers`.`last_run` ASC, `schedulers`.`period` ASC","table":"schedulers","md5":"4260fe933610a4be8d20351a87bf517a","messages":[{"tag":"access_type_tablescan","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":null,"index_used":null},{"tag":"retsize","result_size":21,"result_bytes":1827,"cost":0.000713671875}],"cost":0.000718921875,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"3.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"schedulers","access_type":"ALL","rows_examined_per_scan":21,"rows_produced_per_join":1,"filtered":"4.76","cost_info":{"read_cost":"2.25","eval_cost":"0.10","prefix_cost":"2.35","data_read_per_join":"4K"},"used_columns":["id","name","method","period","running","last_run","prio","pid","note","error_message","status","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`schedulers`.`active` = 1) and (`zammad_development`.`schedulers`.`period` > 300) and (`zammad_development`.`schedulers`.`last_run` is not null))"}}}},"backtrace":["app/controllers/monitoring_controller.rb:79:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `schedulers` WHERE `schedulers`.`active` = 1 AND `schedulers`.`last_run` IS NULL","table":"schedulers","md5":"2e9ec9c8df03909dd167f7492a7e43b6","messages":[{"tag":"access_type_tablescan","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.35"},"table":{"table_name":"schedulers","access_type":"ALL","rows_examined_per_scan":21,"rows_produced_per_join":1,"filtered":"4.76","cost_info":{"read_cost":"2.25","eval_cost":"0.10","prefix_cost":"2.35","data_read_per_join":"4K"},"used_columns":["last_run","active"],"attached_condition":"((`zammad_development`.`schedulers`.`active` = 1) and isnull(`zammad_development`.`schedulers`.`last_run`))"}}},"backtrace":["app/controllers/monitoring_controller.rb:86:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `schedulers` WHERE `schedulers`.`active` = 1","table":"schedulers","md5":"2e312457edef4f1d2657b10bde0a129c","messages":[{"tag":"access_type_tablescan","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.35"},"table":{"table_name":"schedulers","access_type":"ALL","rows_examined_per_scan":21,"rows_produced_per_join":2,"filtered":"10.00","cost_info":{"read_cost":"2.14","eval_cost":"0.21","prefix_cost":"2.35","data_read_per_join":"9K"},"used_columns":["active"],"attached_condition":"(`zammad_development`.`schedulers`.`active` = 1)"}}},"backtrace":["app/controllers/monitoring_controller.rb:86:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `delayed_jobs` WHERE (attempts > 0)","table":"delayed_jobs","md5":"371eb04a95cf5a1c1143e814c5c0657e","messages":[{"tag":"access_type_tablescan","table_size":19,"table":"delayed_jobs","cost":4.749999999999999e-06,"rows_read":19,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":4.749999999999999e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.15"},"table":{"table_name":"delayed_jobs","access_type":"ALL","rows_examined_per_scan":19,"rows_produced_per_join":6,"filtered":"33.33","cost_info":{"read_cost":"1.52","eval_cost":"0.63","prefix_cost":"2.15","data_read_per_join":"9K"},"used_columns":["attempts"],"attached_condition":"(`zammad_development`.`delayed_jobs`.`attempts` > 0)"}}},"backtrace":["app/controllers/monitoring_controller.rb:97:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `delayed_jobs`.* FROM `delayed_jobs` WHERE (attempts > 0) ORDER BY `delayed_jobs`.`created_at` ASC LIMIT 10","table":"delayed_jobs","md5":"487a1a012e0425a88334c75ec7bdfe99","messages":[{"tag":"access_type_tablescan","table_size":19,"table":"delayed_jobs","cost":4.749999999999999e-06,"rows_read":19,"index":null,"index_used":null},{"tag":"retsize","result_size":10,"result_bytes":5910,"cost":0.0023085937500000003}],"cost":0.0023133437500000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"8.48"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"6.33"},"table":{"table_name":"delayed_jobs","access_type":"ALL","rows_examined_per_scan":19,"rows_produced_per_join":6,"filtered":"33.33","cost_info":{"read_cost":"1.52","eval_cost":"0.63","prefix_cost":"2.15","data_read_per_join":"9K"},"used_columns":["id","priority","attempts","handler","last_error","run_at","locked_at","failed_at","locked_by","queue","created_at","updated_at"],"attached_condition":"(`zammad_development`.`delayed_jobs`.`attempts` > 0)"}}}},"backtrace":["app/controllers/monitoring_controller.rb:103:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `delayed_jobs` WHERE (created_at < '2019-02-25 16:09:21.552303')","table":"delayed_jobs","md5":"0c9b8787d596e124765d6ab5bbe69c0b","messages":[{"tag":"access_type_tablescan","table_size":19,"table":"delayed_jobs","cost":4.749999999999999e-06,"rows_read":19,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":4.749999999999999e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.15"},"table":{"table_name":"delayed_jobs","access_type":"ALL","rows_examined_per_scan":19,"rows_produced_per_join":6,"filtered":"33.33","cost_info":{"read_cost":"1.52","eval_cost":"0.63","prefix_cost":"2.15","data_read_per_join":"9K"},"used_columns":["created_at"],"attached_condition":"(`zammad_development`.`delayed_jobs`.`created_at` < '2019-02-25 16:09:21.552303')"}}},"backtrace":["app/controllers/monitoring_controller.rb:125:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE (last_login IS NOT NULL) ORDER BY `users`.`last_login` DESC LIMIT 1","table":"users","md5":"7b3d6deb48f6aaf4f44a420c80b3e6bd","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":5.0e-07,"rows_read":2,"index":"index_users_on_last_login","index_used":["last_login"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.00039151562500000005,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.71"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"users","access_type":"range","possible_keys":["index_users_on_last_login"],"key":"index_users_on_last_login","used_key_parts":["last_login"],"key_length":"7","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`users`.`last_login` is not null)","backward_index_scan":true,"cost_info":{"read_cost":"0.61","eval_cost":"0.10","prefix_cost":"0.71","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:216:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM (SELECT DISTINCT `users`.* FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` WHERE ((roles_users.role_id IN (2)) AND users.active = 1) ORDER BY `users`.`id` ASC) subquery_for_count","table":"(select","md5":"9f59be0aeb9da9f75d38f2bcec1a09dc","messages":[{"tag":"access_type_tablescan","table_size":null,"table":"subquery_for_count","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.72"},"table":{"table_name":"subquery_for_count","access_type":"ALL","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"2.52","eval_cost":"0.20","prefix_cost":"2.73","data_read_per_join":"92K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"materialized_from_subquery":{"using_temporary_table":true,"dependent":false,"cacheable":true,"query_block":{"select_id":2,"cost_info":{"query_cost":"0.95"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"0.25"},"nested_loop":[{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"(`zammad_development`.`roles_users`.`user_id` is not null)"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.25","eval_cost":"0.03","prefix_cost":"0.70","data_read_per_join":"11K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`active` = 1)"}}]}}}}}}},"backtrace":["app/controllers/monitoring_controller.rb:225:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `users`","table":"users","md5":"4a5c439ce2bc698fade1cee2309563e0","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/controllers/monitoring_controller.rb:237:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `users`.* FROM `users` ORDER BY `users`.`id` DESC LIMIT 1","table":"users","md5":"030c0de7b3ee129c7e87adc8adf4f357","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"users","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.65"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"users","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":4,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.40","prefix_cost":"0.65","data_read_per_join":"185K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `groups`.* FROM `groups` ORDER BY `groups`.`id` DESC LIMIT 1","table":"groups","md5":"498b7890c17e328339247dbaa2fc74ec","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"groups","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"groups","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","signature_id","email_address_id","name","assignment_timeout","follow_up_possible","follow_up_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `overviews`","table":"overviews","md5":"9ecd9a3c53829260b650b1035e4c736c","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/controllers/monitoring_controller.rb:237:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `overviews`.* FROM `overviews` ORDER BY `overviews`.`id` DESC LIMIT 1","table":"overviews","md5":"1e88f79753d318f60de1f254ac38a9bc","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"overviews","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.15"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"overviews","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":9,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.90","prefix_cost":"1.15","data_read_per_join":"119K"},"used_columns":["id","name","link","prio","condition","order","group_by","group_direction","organization_shared","out_of_office","view","active","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `tickets`","table":"tickets","md5":"e99705c037d10abbaa63728f1f32ffd0","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/controllers/monitoring_controller.rb:237:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `tickets`.* FROM `tickets` ORDER BY `tickets`.`id` DESC LIMIT 1","table":"tickets","md5":"115a4aea6eb035d954e43fa5393b7ad1","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"tickets","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"83896.93"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":779064,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"5990.53","eval_cost":"77906.40","prefix_cost":"83896.93","data_read_per_join":"1G"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles`","table":"ticket_articles","md5":"750e88906dbcc8ed9a396cadc6d4ebf7","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/controllers/monitoring_controller.rb:237:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` ORDER BY `ticket_articles`.`id` DESC LIMIT 1","table":"ticket_articles","md5":"21195bcad3fa76732698bc82ca749d93","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"ticket_articles","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.55"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"ticket_articles","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":3,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT COUNT(*) FROM `text_modules`","table":"text_modules","md5":"75754534dacce7d0c4b6a0de44f10e23","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Select tables optimized away"}},"backtrace":["app/controllers/monitoring_controller.rb:237:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `text_modules`.* FROM `text_modules` ORDER BY `text_modules`.`id` DESC LIMIT 1","table":"text_modules","md5":"3ae8e405b131432fa5756b74e2fe36a7","messages":[{"tag":"limited_scan","cost":2.5e-07,"table":"text_modules","rows_read":1},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.95"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"text_modules","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":27,"filtered":"100.00","backward_index_scan":true,"cost_info":{"read_cost":"0.25","eval_cost":"2.70","prefix_cost":"2.95","data_read_per_join":"80K"},"used_columns":["id","user_id","name","keywords","content","note","active","foreign_id","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/monitoring_controller.rb:238:in `block in status'","app/controllers/monitoring_controller.rb:236:in `each'","app/controllers/monitoring_controller.rb:236:in `status'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `permissions`.* FROM `permissions` WHERE `permissions`.`name` = 'admin.monitoring' AND `permissions`.`active` = 1 LIMIT 1","table":"permissions","md5":"0b1ae7df171b5420b82eb95029043952","messages":[{"tag":"access_type_const","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"permissions","access_type":"const","possible_keys":["index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"31K"},"used_columns":["id","name","note","preferences","active","created_at","updated_at"]}}},"backtrace":["app/controllers/monitoring_controller.rb:399:in `access_check'","app/controllers/monitoring_controller.rb:370:in `token'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `import_jobs`.* FROM `import_jobs` WHERE `import_jobs`.`name` = 'Import::Ldap' AND `import_jobs`.`dry_run` = 0 AND (finished_at >= '2019-02-25 16:22:08.237147') ORDER BY `import_jobs`.`id` ASC LIMIT 1","table":"import_jobs","md5":"40768e5c87c6e416ac178b7cc642fe21","messages":[{"tag":"access_type_index","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"import_jobs","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["id","name","dry_run","payload","result","started_at","finished_at","created_at","updated_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`dry_run` = 0) and (`zammad_development`.`import_jobs`.`name` = 'Import::Ldap') and (`zammad_development`.`import_jobs`.`finished_at` >= '2019-02-25 16:22:08.237147'))"}}}},"backtrace":["app/controllers/monitoring_controller.rb:139:in `block in health_check'","app/controllers/monitoring_controller.rb:134:in `each'","app/controllers/monitoring_controller.rb:134:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `import_jobs`.* FROM `import_jobs` WHERE `import_jobs`.`name` = 'Import::Ldap' AND `import_jobs`.`dry_run` = 0 AND `import_jobs`.`finished_at` IS NULL AND (updated_at <= '2019-02-25 16:22:08.245426') ORDER BY `import_jobs`.`id` ASC LIMIT 1","table":"import_jobs","md5":"350962d333079c328a0c33abca575bf6","messages":[{"tag":"access_type_index","table_size":0,"table":"import_jobs","cost":0.0,"rows_read":0,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"import_jobs","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"808"},"used_columns":["id","name","dry_run","payload","result","started_at","finished_at","created_at","updated_at"],"attached_condition":"((`zammad_development`.`import_jobs`.`dry_run` = 0) and (`zammad_development`.`import_jobs`.`name` = 'Import::Ldap') and isnull(`zammad_development`.`import_jobs`.`finished_at`) and (`zammad_development`.`import_jobs`.`updated_at` <= '2019-02-25 16:22:08.245426'))"}}}},"backtrace":["app/controllers/monitoring_controller.rb:157:in `block in health_check'","app/controllers/monitoring_controller.rb:151:in `each'","app/controllers/monitoring_controller.rb:151:in `health_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 5590 AND `user_devices`.`user_agent` = 'unknown'","table":"user_devices","md5":"644d4ce1032836ea28313308ff40860d","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"],"attached_condition":"(`zammad_development`.`user_devices`.`user_agent` = 'unknown')"}}},"backtrace":["app/models/user_device.rb:60:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 5590 AND `user_devices`.`os` IS NULL AND `user_devices`.`browser` = 'unknown' AND `user_devices`.`location` = 'unknown' AND `user_devices`.`fingerprint` IS NULL LIMIT 1","table":"user_devices","md5":"3c09092cc254ab2c7de5d3733e32e39a","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id","index_user_devices_on_os_and_browser_and_location","index_user_devices_on_fingerprint"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"],"attached_condition":"(isnull(`zammad_development`.`user_devices`.`os`) and (`zammad_development`.`user_devices`.`browser` = 'unknown') and (`zammad_development`.`user_devices`.`location` = 'unknown') and isnull(`zammad_development`.`user_devices`.`fingerprint`))"}}},"backtrace":["app/models/user_device.rb:101:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`id` = 2 LIMIT 1","table":"user_devices","md5":"103191f0fc4456fa20516f879ffced5f","messages":[{"tag":"access_type_const","table":"user_devices"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/user_device.rb:157:in `action'","app/models/user_device.rb:63:in `block in add'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/user_device.rb:60:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (created_at >= '2019-02-25 15:28:40.461028')","table":"tickets","md5":"3853d32e36f7b798477977d7471bfa0b","messages":[{"tag":"access_type_range","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_created_at","index_used":["created_at"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.20"},"table":{"table_name":"tickets","access_type":"range","possible_keys":["index_tickets_on_created_at"],"key":"index_tickets_on_created_at","used_key_parts":["created_at"],"key_length":"5","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.10","eval_cost":"0.10","prefix_cost":"1.20","data_read_per_join":"2K"},"used_columns":["created_at"],"attached_condition":"(`zammad_development`.`tickets`.`created_at` >= '2019-02-25 15:28:40.461028')"}}},"backtrace":["app/controllers/monitoring_controller.rb:358:in `amount_check'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` = 1","table":"users","md5":"7ff990070796eeac53f56b15c8d98ee5","messages":[{"tag":"access_type_const","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"users","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_associations.rb:59:in `block in associations_from_param'","app/models/application_model/can_associations.rb:34:in `map'","app/models/application_model/can_associations.rb:34:in `associations_from_param'","app/controllers/application_controller/renders_models.rb:16:in `model_create_render'","app/controllers/overviews_controller.rb:109:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `roles`.id AS `roles`, `users`.id AS `users` FROM `overviews` LEFT OUTER JOIN `overviews_roles` ON `overviews_roles`.`overview_id` = `overviews`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `overviews_roles`.`role_id` LEFT OUTER JOIN `overviews_users` ON `overviews_users`.`overview_id` = `overviews`.`id` LEFT OUTER JOIN `users` ON `users`.`id` = `overviews_users`.`user_id` WHERE `overviews`.`id` = 10","table":"overviews","md5":"d02e11927ebdbf48e062f50923e150c1","messages":[{"tag":"access_type_const","table":"overviews"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_associations.rb:144:in `attributes_with_association_ids'","app/controllers/application_controller/renders_models.rb:35:in `model_create_render_item'","app/controllers/application_controller/renders_models.rb:31:in `model_create_render'","app/controllers/overviews_controller.rb:109:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` ORDER BY position ASC, name ASC","table":"object_manager_attributes","md5":"ff7a16946a59c8b24ce2beb20a05bd5d","messages":[{"tag":"access_type_tablescan","table_size":48,"table":"object_manager_attributes","cost":1.2e-05,"rows_read":48,"index":null,"index_used":null},{"tag":"retsize","result_size":48,"result_bytes":32496,"cost":0.01269375}],"cost":0.01270575,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"53.80"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"48.00"},"table":{"table_name":"object_manager_attributes","access_type":"ALL","rows_examined_per_scan":48,"rows_produced_per_join":48,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"4.80","prefix_cost":"5.80","data_read_per_join":"355K"},"used_columns":["id","object_lookup_id","name","display","data_type","data_option","data_option_new","editable","active","screens","to_create","to_migrate","to_delete","to_config","position","created_by_id","updated_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/object_manager/attribute.rb:58:in `list_full'","app/controllers/object_manager_attributes_controller.rb:15:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `object_manager_attributes`.* FROM `object_manager_attributes` WHERE `object_manager_attributes`.`id` = 49 LIMIT 1","table":"object_manager_attributes","md5":"b7643f7eda86db313485c2ab37655bca","messages":[{"tag":"access_type_const","table":"object_manager_attributes"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/object_manager_attributes_controller.rb:74:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `ticket_states`.`id` FROM `ticket_states` WHERE `ticket_states`.`name` IN ('closed', 'merged', 'removed')","table":"ticket_states","md5":"d873f4312a09f85921d9b4c2128c2bad","messages":[{"tag":"access_type_range","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"index_ticket_states_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":1.8125e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.90"},"table":{"table_name":"ticket_states","access_type":"range","possible_keys":["index_ticket_states_on_name"],"key":"index_ticket_states_on_name","used_key_parts":["name"],"key_length":"752","rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.61","eval_cost":"0.30","prefix_cost":"0.91","data_read_per_join":"4K"},"used_columns":["id","name"],"attached_condition":"(`zammad_development`.`ticket_states`.`name` in ('closed','merged','removed'))"}}},"backtrace":["lib/telegram.rb:315:in `to_ticket'","lib/telegram.rb:667:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`customer_id` = 26 AND (`tickets`.`state_id` NOT IN (4, 5, 6)) ORDER BY `tickets`.`updated_at` ASC LIMIT 1","table":"tickets","md5":"9c54c48feaf1a34a4b5860999a01b2ef","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.251562500000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"50.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 26)","cost_info":{"read_cost":"0.80","eval_cost":"0.05","prefix_cost":"0.90","data_read_per_join":"1K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tickets`.`state_id` not in (4,5,6))"}}}},"backtrace":["lib/telegram.rb:316:in `to_ticket'","lib/telegram.rb:667:in `block in to_group'","app/models/transaction.rb:12:in `block in execute'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`customer_id` = 26 ORDER BY `tickets`.`updated_at` ASC LIMIT 1","table":"tickets","md5":"f5ec19a809b9d2196679239f6aba75f5","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.251562500000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 26)","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["lib/telegram.rb:656:in `to_group'","app/controllers/channels_telegram_controller.rb:70:in `webhook'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`name` = 'closed' LIMIT 1","table":"ticket_states","md5":"1e964f63d37dd1ca5158e43afd4248e1","messages":[{"tag":"access_type_const","table_size":7,"table":"ticket_states","cost":2.5e-07,"rows_read":1,"index":"index_ticket_states_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"ticket_states","access_type":"const","possible_keys":["index_ticket_states_on_name"],"key":"index_ticket_states_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["lib/telegram.rb:657:in `to_group'","app/controllers/channels_telegram_controller.rb:70:in `webhook'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`active` = 1 AND `channels`.`area` = 'Sms::Account'","table":"channels","md5":"357581abea76d1a8026d8ddf0732db75","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"index_channels_on_area","index_used":["area"]},{"tag":"retsize","result_size":2,"result_bytes":680,"cost":0.000265625}],"cost":0.00026612500000000003,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["index_channels_on_area"],"key":"index_channels_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"50.00","cost_info":{"read_cost":"0.25","eval_cost":"0.05","prefix_cost":"0.35","data_read_per_join":"3K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`channels`.`active` = 1)"}}},"backtrace":["app/controllers/channels_sms_controller.rb:33:in `webhook'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`mobile` = '+491710000000' ORDER BY `users`.`updated_at` ASC LIMIT 1","table":"users","md5":"3de1aef999f8a210ee58b9498dc55ead","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"index_users_on_mobile","index_used":["mobile"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_mobile"],"key":"index_users_on_mobile","used_key_parts":["mobile"],"key_length":"303","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`users`.`mobile` <=> '+491710000000')","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/channel/driver/sms/twilio.rb:41:in `process'","app/models/channel.rb:293:in `process'","app/controllers/channels_sms_controller.rb:46:in `webhook'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`customer_id` = 30 AND `tickets`.`create_article_type_id` = 2 AND (`tickets`.`state_id` NOT IN (4, 5, 6)) ORDER BY `tickets`.`updated_at` ASC LIMIT 1","table":"tickets","md5":"33f3b9b01762d771a76643bd48593dcc","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.251562500000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_customer_id","index_tickets_on_create_article_type_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 30)","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"108"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`create_article_type_id` = 2) and (`zammad_development`.`tickets`.`state_id` not in (4,5,6)))"}}}},"backtrace":["app/models/channel/driver/sms/twilio.rb:62:in `process'","app/models/channel.rb:293:in `process'","app/controllers/channels_sms_controller.rb:46:in `webhook'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `ticket_time_accountings`.* FROM `ticket_time_accountings` WHERE `ticket_time_accountings`.`ticket_article_id` = 16 LIMIT 1","table":"ticket_time_accountings","md5":"79949f6ca98521deb2cbdf2c56c5388b","messages":[{"tag":"access_type_ref","table_size":0,"table":"ticket_time_accountings","cost":2.5e-07,"rows_read":1,"index":"index_ticket_time_accountings_on_ticket_article_id","index_used":["ticket_article_id"]},{"tag":"retsize","result_size":1,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.43125e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"ticket_time_accountings","access_type":"ref","possible_keys":["index_ticket_time_accountings_on_ticket_article_id"],"key":"index_ticket_time_accountings_on_ticket_article_id","used_key_parts":["ticket_article_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["id","ticket_id","ticket_article_id","time_unit","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_associations.rb:186:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","app/models/ticket/article.rb:325:in `attributes_with_association_names'","app/controllers/ticket_articles_controller.rb:102:in `create'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `channels`.* FROM `channels` WHERE `channels`.`area` = 'Email::Notification' AND `channels`.`active` = 1 LIMIT 1","table":"channels","md5":"4ecaf5f4849f6848e59df151552b611b","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"index_channels_on_area","index_used":["area"]},{"tag":"retsize","result_size":1,"result_bytes":340,"cost":0.0001328125}],"cost":0.00013331250000000002,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["index_channels_on_area"],"key":"index_channels_on_area","used_key_parts":["area"],"key_length":"302","ref":["const"],"rows_examined_per_scan":2,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"6K"},"used_columns":["id","group_id","area","options","active","preferences","last_log_in","last_log_out","status_in","status_out","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`channels`.`active` = 1)"}}},"backtrace":["lib/notification_factory/mailer.rb:135:in `send'","lib/notification_factory/mailer.rb:189:in `notification'","app/models/transaction/notification.rb:199:in `block in perform'","app/models/transaction/notification.rb:92:in `each'","app/models/transaction/notification.rb:92:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'"]},{"sql":"SELECT `ticket_articles`.* FROM `ticket_articles` WHERE `ticket_articles`.`ticket_id` = 7 ORDER BY `ticket_articles`.`created_at` ASC, `ticket_articles`.`id` ASC","table":"ticket_articles","md5":"8ee6579714ca1a097fd97972eaa18256","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":200,"cost":7.8125e-05}],"cost":7.837500000000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`ticket_articles`.`ticket_id` <=> 7)","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["id","ticket_id","type_id","sender_id","from","to","cc","subject","reply_to","message_id","message_id_md5","in_reply_to","content_type","references","body","internal","preferences","updated_by_id","created_by_id","origin_by_id","created_at","updated_at"]}}}},"backtrace":["app/models/transaction/karma.rb:82:in `reverse_each'","app/models/transaction/karma.rb:82:in `ticket_karma'","app/models/transaction/karma.rb:34:in `perform'","app/models/observer/transaction.rb:62:in `execute_singel_backend'","app/models/transaction/background_job.rb:30:in `block in perform'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/transaction/background_job.rb:26:in `perform'"]},{"sql":"SELECT 1 AS one FROM `external_credentials` WHERE `external_credentials`.`name` = 'twitter' LIMIT 1","table":"external_credentials","md5":"b4deba38286a7d39d34dcf124db5d8d9","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"external_credentials","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"external_credentials","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["name"],"attached_condition":"(`zammad_development`.`external_credentials`.`name` = 'twitter')"}}},"backtrace":["app/controllers/channels_twitter_controller.rb:52:in `webhook_verify'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE `tickets`.`create_article_type_id` = 7 AND `tickets`.`customer_id` = 33 AND `tickets`.`state_id` IN (SELECT `ticket_states`.`id` FROM `ticket_states` WHERE (`ticket_states`.`state_type_id` NOT IN (SELECT `ticket_state_types`.`id` FROM `ticket_state_types` WHERE `ticket_state_types`.`name` IN ('closed', 'merged', 'removed')))) LIMIT 1","table":"tickets","md5":"576b73d3b57bc851dd9c65f9972450f6","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"join_type_eq_ref","table_size":7,"table":"ticket_states","join_to":"tickets","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":185,"cost":7.226562500000001e-05}],"cost":7.276562500000001e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"nested_loop":[{"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_state_id","index_tickets_on_customer_id","index_tickets_on_create_article_type_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.00","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"108"},"used_columns":["id","group_id","priority_id","state_id","organization_id","number","title","owner_id","customer_id","note","first_response_at","first_response_escalation_at","first_response_in_min","first_response_diff_in_min","close_at","close_escalation_at","close_in_min","close_diff_in_min","update_escalation_at","update_in_min","update_diff_in_min","last_contact_at","last_contact_agent_at","last_contact_customer_at","last_owner_update_at","create_article_type_id","create_article_sender_id","article_count","escalation_at","pending_time","type","time_unit","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`tickets`.`create_article_type_id` = 7)"}},{"table":{"table_name":"ticket_states","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.tickets.state_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","cost_info":{"read_cost":"0.01","eval_cost":"0.01","prefix_cost":"0.91","data_read_per_join":"77"},"used_columns":["id","state_type_id"],"attached_condition":"(not(<in_optimizer>(`zammad_development`.`ticket_states`.`state_type_id`,<exists>(<primary_index_lookup>(<cache>(`zammad_development`.`ticket_states`.`state_type_id`) in ticket_state_types on PRIMARY where ((`zammad_development`.`ticket_state_types`.`name` in ('closed','merged','removed')) and (<cache>(`zammad_development`.`ticket_states`.`state_type_id`) = `zammad_development`.`ticket_state_types`.`id`)))))))","attached_subqueries":[{"dependent":true,"cacheable":false,"query_block":{"select_id":3,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_state_types","access_type":"unique_subquery","possible_keys":["PRIMARY","index_ticket_state_types_on_name"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["func"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"42.86","cost_info":{"read_cost":"0.25","eval_cost":"0.04","prefix_cost":"0.35","data_read_per_join":"658"},"used_columns":["id","name"],"attached_condition":"((`zammad_development`.`ticket_state_types`.`name` in ('closed','merged','removed')) and (<cache>(`zammad_development`.`ticket_states`.`state_type_id`) = `zammad_development`.`ticket_state_types`.`id`))"}}}]}}]}},"backtrace":["lib/twitter_sync.rb:148:in `to_ticket'","lib/twitter_sync.rb:681:in `block in process_webhook'","lib/twitter_sync.rb:675:in `each'","lib/twitter_sync.rb:675:in `process_webhook'","app/models/channel/driver/twitter.rb:148:in `process'","app/controllers/channels_twitter_controller.rb:11:in `webhook_incoming'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 500 OFFSET 0","table":"users","md5":"75e9ba5138d2549a23ea81a0186110bc","messages":[{"tag":"limited_scan","cost":0.000125,"table":"users","rows_read":500},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.000125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.65"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"users","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.40","prefix_cost":"0.65","data_read_per_join":"185K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/users_controller.rb:61:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `user_devices`.* FROM `user_devices` WHERE `user_devices`.`user_id` = 66 AND `user_devices`.`os` = 'Other' AND `user_devices`.`browser` = 'curl 1.2.3' AND `user_devices`.`location` = 'Germany' AND `user_devices`.`fingerprint` IS NULL LIMIT 1","table":"user_devices","md5":"b59deded16e7f17bdbb57d48f8e44121","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":24,"cost":9.375000000000001e-06}],"cost":9.625e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id","index_user_devices_on_os_and_browser_and_location","index_user_devices_on_fingerprint"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["id","user_id","name","os","browser","location","device_details","location_details","fingerprint","user_agent","ip","created_at","updated_at"],"attached_condition":"((`zammad_development`.`user_devices`.`os` = 'Other') and (`zammad_development`.`user_devices`.`browser` = 'curl 1.2.3') and (`zammad_development`.`user_devices`.`location` = 'Germany') and isnull(`zammad_development`.`user_devices`.`fingerprint`))"}}},"backtrace":["app/models/user_device.rb:101:in `add'","app/jobs/user_device_log_job.rb:3:in `perform'","gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'","gems/i18n-1.1.1/lib/i18n.rb:284:in `with_locale'","gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`name` LIKE '%Zammad%' OR `organizations`.`note` LIKE '%Zammad%') ORDER BY `organizations`.`updated_at` desc LIMIT 100 OFFSET 0","table":"organizations","md5":"0cb937baf96ec9a1be29b4e85cf6b4dd","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`organizations`.`name` like '%Zammad%') or (`zammad_development`.`organizations`.`note` like '%Zammad%'))"}}}},"backtrace":["app/models/organization/search.rb:110:in `search'","app/controllers/organizations_controller.rb:258:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`id` = 8 ORDER BY `organizations`.`id` ASC LIMIT 500 OFFSET 0","table":"organizations","md5":"bfb5b574d523a433ddae57046d751d5f","messages":[{"tag":"access_type_const","table":"organizations"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/organizations_controller.rb:96:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`name` LIKE '%Rest Org%' OR `organizations`.`note` LIKE '%Rest Org%') ORDER BY `organizations`.`created_at` asc LIMIT 100 OFFSET 0","table":"organizations","md5":"6e632cf165c2b2381a1bc1865fdea6cd","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`organizations`.`name` like '%Rest Org%') or (`zammad_development`.`organizations`.`note` like '%Rest Org%'))"}}}},"backtrace":["app/models/organization/search.rb:110:in `search'","app/controllers/organizations_controller.rb:258:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`name` LIKE '%Rest Org%' OR `organizations`.`note` LIKE '%Rest Org%') ORDER BY `organizations`.`note` asc LIMIT 100 OFFSET 0","table":"organizations","md5":"2956ce0c8da0673e6ef3b84f2e34ba35","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`organizations`.`name` like '%Rest Org%') or (`zammad_development`.`organizations`.`note` like '%Rest Org%'))"}}}},"backtrace":["app/models/organization/search.rb:110:in `search'","app/controllers/organizations_controller.rb:258:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`name` LIKE '%Rest Org%' OR `organizations`.`note` LIKE '%Rest Org%') ORDER BY `organizations`.`note` desc LIMIT 100 OFFSET 0","table":"organizations","md5":"d5491a0ed5fb0d8fd0484f85ba7e29b0","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`organizations`.`name` like '%Rest Org%') or (`zammad_development`.`organizations`.`note` like '%Rest Org%'))"}}}},"backtrace":["app/models/organization/search.rb:110:in `search'","app/controllers/organizations_controller.rb:258:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`name` LIKE '%Rest Org%' OR `organizations`.`note` LIKE '%Rest Org%') ORDER BY `organizations`.`note` desc, `organizations`.`created_at` asc LIMIT 100 OFFSET 0","table":"organizations","md5":"6719817efd52e8fce68ad21be70b6349","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`organizations`.`name` like '%Rest Org%') or (`zammad_development`.`organizations`.`note` like '%Rest Org%'))"}}}},"backtrace":["app/models/organization/search.rb:110:in `search'","app/controllers/organizations_controller.rb:258:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `histories`.* FROM `histories` WHERE `histories`.`history_object_id` = 3 AND `histories`.`o_id` = 35 ORDER BY created_at ASC, id ASC","table":"histories","md5":"ad16adcc6de949cc3b3c22e8f0d2f2ee","messages":[{"tag":"access_type_ref","table_size":10000000,"table":"histories","cost":1.0e-06,"rows_read":4,"index":"index_histories_on_o_id","index_used":["o_id"]},{"tag":"retsize","result_size":4,"result_bytes":308,"cost":0.0001203125}],"cost":0.0001213125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"histories","access_type":"ref","possible_keys":["index_histories_on_o_id","index_histories_on_history_object_id","index_histories_on_o_id_and_history_object_id_and_related_o_id"],"key":"index_histories_on_o_id","used_key_parts":["o_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.26","index_condition":"(`zammad_development`.`histories`.`o_id` <=> 35)","cost_info":{"read_cost":"0.25","eval_cost":"0.01","prefix_cost":"0.35","data_read_per_join":"161"},"used_columns":["id","history_type_id","history_object_id","history_attribute_id","o_id","related_o_id","related_history_object_id","id_to","id_from","value_from","value_to","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`histories`.`history_object_id` = 3)"}}}},"backtrace":["app/models/history.rb:171:in `list'","app/models/concerns/has_history.rb:214:in `history_get'","app/controllers/organizations_controller.rb:317:in `history'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (1=1) LIMIT 23 OFFSET 1","table":"organizations","md5":"2d5fcd9bf7fd75cba2aa446822339bc8","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"organizations","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/concerns/can_csv_import.rb:330:in `csv_example'","app/controllers/organizations_controller.rb:331:in `import_example'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE (`organizations`.`id` NOT IN (39, 40, 41)) LIMIT 17","table":"organizations","md5":"50fef95431dbb8dd1e661996bfc60dfb","messages":[{"tag":"access_type_range","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.81"},"table":{"table_name":"organizations","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"1.41","eval_cost":"0.40","prefix_cost":"1.81","data_read_per_join":"62K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`organizations`.`id` not in (39,40,41))"}}},"backtrace":["app/models/concerns/can_csv_import.rb:334:in `concat'","app/models/concerns/can_csv_import.rb:334:in `csv_example'","app/controllers/organizations_controller.rb:331:in `import_example'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`name` = 'organization-member-import1'","table":"organizations","md5":"f263131546d5b6d419046f837d64e490","messages":[{"tag":"access_type_const","table":"organizations"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/concerns/can_csv_import.rb:195:in `block (2 levels) in csv_import'","app/models/concerns/can_csv_import.rb:186:in `each'","app/models/concerns/can_csv_import.rb:186:in `block in csv_import'","app/models/concerns/can_csv_import.rb:183:in `each'","app/models/concerns/can_csv_import.rb:183:in `csv_import'","app/controllers/organizations_controller.rb:355:in `import_start'"]},{"sql":"SELECT `packages`.* FROM `packages` ORDER BY name","table":"packages","md5":"ca0fb757d813928ca66000ad44acebe2","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"packages","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.35"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"1.00"},"table":{"table_name":"packages","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["id","name","version","vendor","state","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/packages_controller.rb:9:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `report_profiles`.* FROM `report_profiles` WHERE `report_profiles`.`id` = 1 LIMIT 1","table":"report_profiles","md5":"7a2156124f55d98b0639375514635bac","messages":[{"tag":"access_type_const","table_size":1,"table":"report_profiles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"report_profiles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"496"},"used_columns":["id","name","condition","active","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/reports_controller.rb:122:in `params_all'","app/controllers/reports_controller.rb:65:in `sets'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `object_manager_attributes`.`name`, `object_manager_attributes`.`display`, `object_manager_attributes`.`data_type`, `object_manager_attributes`.`data_option` FROM `object_manager_attributes` WHERE `object_manager_attributes`.`editable` = 1 AND `object_manager_attributes`.`active` = 1 AND `object_manager_attributes`.`to_create` = 0 AND `object_manager_attributes`.`object_lookup_id` = 1","table":"object_manager_attributes","md5":"f23a3ca3b47e85026f22c88f38ff44f6","messages":[{"tag":"access_type_ref","table_size":48,"table":"object_manager_attributes","cost":2.25e-06,"rows_read":9,"index":"index_object_manager_attributes_on_object_lookup_id_and_name","index_used":["object_lookup_id"]},{"tag":"retsize","result_size":9,"result_bytes":1701,"cost":0.000664453125}],"cost":0.000666703125,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"3.20"},"table":{"table_name":"object_manager_attributes","access_type":"ref","possible_keys":["index_object_manager_attributes_on_object_lookup_id_and_name","index_object_manager_attributes_on_object_lookup_id"],"key":"index_object_manager_attributes_on_object_lookup_id_and_name","used_key_parts":["object_lookup_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":20,"rows_produced_per_join":0,"filtered":"2.08","cost_info":{"read_cost":"1.20","eval_cost":"0.04","prefix_cost":"3.20","data_read_per_join":"3K"},"used_columns":["object_lookup_id","name","display","data_type","data_option","editable","active","to_create"],"attached_condition":"((`zammad_development`.`object_manager_attributes`.`to_create` = 0) and (`zammad_development`.`object_manager_attributes`.`active` = 1) and (`zammad_development`.`object_manager_attributes`.`editable` = 1))"}}},"backtrace":["app/controllers/reports_controller.rb:224:in `sheet'","app/controllers/reports_controller.rb:102:in `block in sets'","app/controllers/reports_controller.rb:77:in `each'","app/controllers/reports_controller.rb:77:in `sets'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,4)) AND ((tickets.title LIKE '%1234%' OR tickets.number LIKE '%1234%' OR ticket_articles.body LIKE '%1234%' OR ticket_articles.from LIKE '%1234%' OR ticket_articles.to LIKE '%1234%' OR ticket_articles.subject LIKE '%1234%')) ORDER BY `tickets`.`updated_at` desc LIMIT 1 OFFSET 0","table":"tickets","md5":"6a1e8762c714fa74489f69a50af1441d","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":6.1875000000000005e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,4)) and ((`zammad_development`.`tickets`.`title` like '%1234%') or (`zammad_development`.`tickets`.`number` like '%1234%') or (`zammad_development`.`ticket_articles`.`body` like '%1234%') or (`zammad_development`.`ticket_articles`.`from` like '%1234%') or (`zammad_development`.`ticket_articles`.`to` like '%1234%') or (`zammad_development`.`ticket_articles`.`subject` like '%1234%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/search_controller.rb:120:in `search_generic_backend'","app/controllers/search_controller.rb:104:in `block in search_generic'","app/controllers/search_controller.rb:103:in `each'","app/controllers/search_controller.rb:103:in `search_generic'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%1234%' OR lastname LIKE '%1234%' OR email LIKE '%1234%' OR login LIKE '%1234%') AND id != 1) ORDER BY `users`.`updated_at` desc LIMIT 1 OFFSET 0","table":"users","md5":"2517341cef916153dc8225d882d2e159","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.31"},"ordering_operation":{"using_filesort":true,"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%1234%') or (`zammad_development`.`users`.`lastname` like '%1234%') or (`zammad_development`.`users`.`email` like '%1234%') or (`zammad_development`.`users`.`login` like '%1234%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/search_controller.rb:126:in `search_generic_backend'","app/controllers/search_controller.rb:104:in `block in search_generic'","app/controllers/search_controller.rb:103:in `each'","app/controllers/search_controller.rb:103:in `search_generic'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT DISTINCT(organizations.id), `organizations`.`updated_at` FROM `organizations` LEFT OUTER JOIN users ON users.organization_id = organizations.id WHERE ((`users`.`firstname` LIKE '%1234%' OR `users`.`lastname` LIKE '%1234%') OR `users`.`email` LIKE '%1234%') ORDER BY `organizations`.`updated_at` desc LIMIT 1","table":"organizations","md5":"d853c28e92252302caac53f69a13676a","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"access_type_tablescan","table_size":100000,"table":"users","cost":0.024999999999999998,"rows_read":100000,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":0.025004937499999998,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.16"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.16"},"nested_loop":[{"table":{"table_name":"organizations","access_type":"ALL","possible_keys":["PRIMARY"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["id","updated_at"]}},{"table":{"table_name":"users","access_type":"ALL","possible_keys":["index_users_on_organization_id"],"rows_examined_per_scan":4,"rows_produced_per_join":1,"filtered":"28.91","distinct":true,"using_join_buffer":"Block Nested Loop","cost_info":{"read_cost":"0.42","eval_cost":"0.12","prefix_cost":"1.00","data_read_per_join":"53K"},"used_columns":["id","organization_id","firstname","lastname","email"],"attached_condition":"((`zammad_development`.`users`.`organization_id` = `zammad_development`.`organizations`.`id`) and ((`zammad_development`.`users`.`firstname` like '%1234%') or (`zammad_development`.`users`.`lastname` like '%1234%') or (`zammad_development`.`users`.`email` like '%1234%')))"}}]}}}},"backtrace":["app/models/organization/search.rb:124:in `search'","app/controllers/search_controller.rb:120:in `search_generic_backend'","app/controllers/search_controller.rb:104:in `block in search_generic'","app/controllers/search_controller.rb:103:in `each'","app/controllers/search_controller.rb:103:in `search_generic'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (tickets.customer_id = 166) AND ((tickets.title LIKE '%1234%' OR tickets.number LIKE '%1234%' OR ticket_articles.body LIKE '%1234%' OR ticket_articles.from LIKE '%1234%' OR ticket_articles.to LIKE '%1234%' OR ticket_articles.subject LIKE '%1234%')) ORDER BY `tickets`.`updated_at` desc LIMIT 10 OFFSET 0","table":"tickets","md5":"330639becd8ae7d0249e7f7c8bc26c06","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"join_type_ref","table_size":3,"table":"ticket_articles","join_to":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":5.187500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.24"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"nested_loop":[{"table":{"table_name":"tickets","access_type":"ref","possible_keys":["PRIMARY","index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 166)","cost_info":{"read_cost":"0.80","eval_cost":"0.10","prefix_cost":"0.90","data_read_per_join":"2K"},"used_columns":["id","number","title","customer_id","updated_at"]}},{"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_ticket_id"],"key":"index_ticket_articles_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["zammad_development.tickets.id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","distinct":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"1.25","data_read_per_join":"63K"},"used_columns":["id","ticket_id","from","to","subject","body"],"attached_condition":"((`zammad_development`.`tickets`.`title` like '%1234%') or (`zammad_development`.`tickets`.`number` like '%1234%') or (`zammad_development`.`ticket_articles`.`body` like '%1234%') or (`zammad_development`.`ticket_articles`.`from` like '%1234%') or (`zammad_development`.`ticket_articles`.`to` like '%1234%') or (`zammad_development`.`ticket_articles`.`subject` like '%1234%'))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/search_controller.rb:120:in `search_generic_backend'","app/controllers/search_controller.rb:104:in `block in search_generic'","app/controllers/search_controller.rb:103:in `each'","app/controllers/search_controller.rb:103:in `search_generic'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE ((tickets.customer_id = 172 OR tickets.organization_id = 67)) AND ((tickets.title LIKE '%1234%' OR tickets.number LIKE '%1234%' OR ticket_articles.body LIKE '%1234%' OR ticket_articles.from LIKE '%1234%' OR ticket_articles.to LIKE '%1234%' OR ticket_articles.subject LIKE '%1234%')) ORDER BY `tickets`.`updated_at` desc LIMIT 10 OFFSET 0","table":"tickets","md5":"43340ae1bb4cb38a50454405e359bdfd","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.5562500000000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"6.24"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"3.00"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_customer_id","fk_rails_b62b455ecb"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"2.39","eval_cost":"0.30","prefix_cost":"3.24","data_read_per_join":"6K"},"used_columns":["id","organization_id","number","title","customer_id","updated_at"],"attached_condition":"(((`zammad_development`.`tickets`.`customer_id` = 172) or (`zammad_development`.`tickets`.`organization_id` = 67)) and ((`zammad_development`.`tickets`.`title` like '%1234%') or (`zammad_development`.`tickets`.`number` like '%1234%') or (`zammad_development`.`ticket_articles`.`body` like '%1234%') or (`zammad_development`.`ticket_articles`.`from` like '%1234%') or (`zammad_development`.`ticket_articles`.`to` like '%1234%') or (`zammad_development`.`ticket_articles`.`subject` like '%1234%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/search_controller.rb:120:in `search_generic_backend'","app/controllers/search_controller.rb:104:in `block in search_generic'","app/controllers/search_controller.rb:103:in `each'","app/controllers/search_controller.rb:103:in `search_generic'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `settings`.* FROM `settings`","table":"settings","md5":"2d154635793d90eb3cf5667a9a34367e","messages":[{"tag":"access_type_tablescan","table_size":201,"table":"settings","cost":5.0249999999999995e-05,"rows_read":201,"index":null,"index_used":null},{"tag":"retsize","result_size":201,"result_bytes":151353,"cost":0.059122265625}],"cost":0.059172515625000005,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"22.60"},"table":{"table_name":"settings","access_type":"ALL","rows_examined_per_scan":201,"rows_produced_per_join":201,"filtered":"100.00","cost_info":{"read_cost":"2.50","eval_cost":"20.10","prefix_cost":"22.60","data_read_per_join":"3M"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["app/controllers/settings_controller.rb:9:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`id` = 9 LIMIT 1","table":"settings","md5":"f11747ff0349d251cef0994926e8a5c5","messages":[{"tag":"access_type_const","table_size":201,"table":"settings","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"settings","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:54:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/controllers/settings_controller.rb:110:in `check_access'","app/controllers/settings_controller.rb:19:in `show'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT `settings`.* FROM `settings` WHERE `settings`.`id` = 9 LIMIT 1 FOR UPDATE","table":"settings","md5":"0f9da2f6e4e05fd022381644daa8c50e","messages":[{"tag":"access_type_const","table_size":201,"table":"settings","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"settings","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"19K"},"used_columns":["id","title","name","area","description","options","state_current","state_initial","frontend","preferences","created_at","updated_at"]}}},"backtrace":["app/controllers/application_controller/renders_models.rb:46:in `model_update_render'","app/controllers/settings_controller.rb:32:in `update'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `slas`.* FROM `slas` ORDER BY `slas`.`id` ASC LIMIT 18446744073709551615 OFFSET 0","table":"slas","md5":"56aa8beeae0131754a82eee810e338b1","messages":[{"tag":"limited_scan","cost":0.0,"table":"slas","rows_read":0},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"ordering_operation":{"using_filesort":false,"table":{"table_name":"slas","access_type":"index","key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["id","calendar_id","name","first_response_time","update_time","solution_time","condition","updated_by_id","created_by_id","created_at","updated_at"]}}}},"backtrace":["app/controllers/application_controller/renders_models.rb:145:in `model_index_render'","app/controllers/slas_controller.rb:73:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `calendars`.* FROM `calendars`","table":"calendars","md5":"ac2af1bc7b9b6c2781110856fc766cf0","messages":[{"tag":"access_type_tablescan","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":10757,"cost":0.004201953125}],"cost":0.004202203125000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.60"},"table":{"table_name":"calendars","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.50","eval_cost":"0.10","prefix_cost":"0.60","data_read_per_join":"11K"},"used_columns":["id","name","timezone","business_hours","default","ical_url","public_holidays","last_log","last_sync","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/slas_controller.rb:56:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `slas`.* FROM `slas`","table":"slas","md5":"99e6789ca4ef9b36c5599edf5071d4ad","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"slas","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"slas","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["id","calendar_id","name","first_response_time","update_time","solution_time","condition","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/controllers/slas_controller.rb:62:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `taskbars`.* FROM `taskbars` WHERE `taskbars`.`id` = 1 LIMIT 1","table":"taskbars","md5":"06eafcb249e6f08830c432c8556aa044","messages":[{"tag":"access_type_const","table":"taskbars"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/taskbar_controller.rb:23:in `update'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `text_modules`.* FROM `text_modules` WHERE `text_modules`.`foreign_id` = 95 LIMIT 1","table":"text_modules","md5":"4990c0fe619a3454656f0b708050d563","messages":[{"tag":"access_type_tablescan","table_size":27,"table":"text_modules","cost":6.75e-06,"rows_read":27,"index":null,"index_used":null},{"tag":"retsize","result_size":1,"result_bytes":108,"cost":4.21875e-05}],"cost":4.8937500000000004e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.95"},"table":{"table_name":"text_modules","access_type":"ALL","rows_examined_per_scan":27,"rows_produced_per_join":2,"filtered":"10.00","cost_info":{"read_cost":"2.68","eval_cost":"0.27","prefix_cost":"2.95","data_read_per_join":"8K"},"used_columns":["id","user_id","name","keywords","content","note","active","foreign_id","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`text_modules`.`foreign_id` = 95)"}}},"backtrace":["app/models/text_module.rb:45:in `block (2 levels) in load'","app/models/text_module.rb:44:in `each'","app/models/text_module.rb:44:in `block in load'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'"]},{"sql":"SELECT `text_modules`.* FROM `text_modules` WHERE (1=1) LIMIT 23 OFFSET 1","table":"text_modules","md5":"e7a2ad3c0ebb370cce4a9c57e6ad2819","messages":[{"tag":"access_type_tablescan","table_size":27,"table":"text_modules","cost":6.75e-06,"rows_read":27,"index":null,"index_used":null},{"tag":"retsize","result_size":23,"result_bytes":2484,"cost":0.0009703125}],"cost":0.0009770625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"2.95"},"table":{"table_name":"text_modules","access_type":"ALL","rows_examined_per_scan":27,"rows_produced_per_join":27,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"2.70","prefix_cost":"2.95","data_read_per_join":"80K"},"used_columns":["id","user_id","name","keywords","content","note","active","foreign_id","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/concerns/can_csv_import.rb:330:in `csv_example'","app/controllers/text_modules_controller.rb:166:in `import_example'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `text_modules`.* FROM `text_modules` WHERE `text_modules`.`name` = 'some name1'","table":"text_modules","md5":"5f668c87dd80e6f9a573081715aa9bb2","messages":[{"tag":"access_type_ref","table_size":27,"table":"text_modules","cost":2.5e-07,"rows_read":1,"index":"index_text_modules_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":108,"cost":4.21875e-05}],"cost":4.24375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"text_modules","access_type":"ref","possible_keys":["index_text_modules_on_name"],"key":"index_text_modules_on_name","used_key_parts":["name"],"key_length":"752","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["id","user_id","name","keywords","content","note","active","foreign_id","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/concerns/can_csv_import.rb:195:in `block (2 levels) in csv_import'","app/models/concerns/can_csv_import.rb:186:in `each'","app/models/concerns/can_csv_import.rb:186:in `block in csv_import'","app/models/concerns/can_csv_import.rb:183:in `each'","app/models/concerns/can_csv_import.rb:183:in `csv_import'","app/controllers/text_modules_controller.rb:195:in `import_start'"]},{"sql":"SELECT COUNT(DISTINCT `tickets`.`id`) FROM `tickets` WHERE (tickets.customer_id = 1) AND (`tickets`.`title` LIKE ('%some value 123%') AND `tickets`.`id` IN (1))","table":"tickets","md5":"9ef7c325ebacf4ae1e9c1f1a7cf5e313","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket.rb:445:in `block in selectors'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'","gems/activerecord-5.1.6.1/lib/active_record/transactions.rb:210:in `transaction'","app/models/ticket.rb:436:in `selectors'"]},{"sql":"SELECT `tickets`.* FROM `tickets` WHERE (`tickets`.`title` LIKE ('%some value 123%')) AND `tickets`.`id` = 66 LIMIT 1","table":"tickets","md5":"b2e8234dc8915bc57f68bcc57f267cbd","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE noticed after reading const tables"}},"backtrace":["app/models/ticket/escalation.rb:308:in `block in escalation_calculation_get_sla'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/ticket/escalation.rb:303:in `escalation_calculation_get_sla'","app/models/ticket/escalation.rb:77:in `escalation_calculation_int'","app/models/ticket/escalation.rb:41:in `escalation_calculation'","app/models/observer/ticket/escalation_update.rb:20:in `_check'","app/models/observer/ticket/escalation_update.rb:7:in `after_commit'"]},{"sql":"SELECT `calendars`.* FROM `calendars` WHERE `calendars`.`id` = 2 LIMIT 1","table":"calendars","md5":"a4b1930a9317d19d1b2c9732208a07ec","messages":[{"tag":"access_type_const","table":"calendars"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/models/ticket/escalation.rb:79:in `escalation_calculation_int'","app/models/ticket/escalation.rb:41:in `escalation_calculation'","app/models/observer/ticket/escalation_update.rb:20:in `_check'","app/models/observer/ticket/escalation_update.rb:7:in `after_commit'","gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'","gems/rails-observers-0.1.5/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:270:in `block in simple'"]},{"sql":"SELECT `ticket_states`.* FROM `ticket_states` WHERE `ticket_states`.`ignore_escalation` = 1","table":"ticket_states","md5":"fa2773f139dd89009fd959d803db83ef","messages":[{"tag":"access_type_tablescan","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":null,"index_used":null},{"tag":"retsize","result_size":7,"result_bytes":329,"cost":0.000128515625}],"cost":0.00013026562499999998,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.95"},"table":{"table_name":"ticket_states","access_type":"ALL","rows_examined_per_scan":7,"rows_produced_per_join":0,"filtered":"14.29","cost_info":{"read_cost":"0.85","eval_cost":"0.10","prefix_cost":"0.95","data_read_per_join":"1K"},"used_columns":["id","state_type_id","name","next_state_id","ignore_escalation","default_create","default_follow_up","note","active","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`ticket_states`.`ignore_escalation` = 1)"}}},"backtrace":["app/models/ticket/escalation.rb:360:in `map'","app/models/ticket/escalation.rb:360:in `period_working_minutes'","app/models/ticket/escalation.rb:339:in `block in destination_time'","app/models/ticket/escalation.rb:336:in `times'","app/models/ticket/escalation.rb:336:in `each'","app/models/ticket/escalation.rb:336:in `destination_time'","app/models/ticket/escalation.rb:200:in `escalation_calculation_int'","app/models/ticket/escalation.rb:41:in `escalation_calculation'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` FORCE INDEX(`index_tickets_on_group_id`) WHERE (group_id IN (1,50)) AND (`tickets`.`title` LIKE ('%ticket with corret ticket id testagent211520689%')) ORDER BY `tickets`.`updated_at` desc LIMIT 50 OFFSET 0","table":"tickets","md5":"34d8b1aebf89286c2a28b5f82d2e815d","messages":[{"tag":"access_type_range","table_size":1000000,"table":"tickets","cost":0.049999999999999996,"rows_read":200000,"index":"index_tickets_on_group_id","index_used":["group_id"]},{"tag":"retsize","result_size":50,"result_bytes":600,"cost":0.00023437500000000002}],"cost":0.050234375,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"387803.00"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"range","possible_keys":["index_tickets_on_group_id"],"key":"index_tickets_on_group_id","used_key_parts":["group_id"],"key_length":"4","rows_examined_per_scan":389533,"rows_produced_per_join":43277,"filtered":"11.11","index_condition":"(`zammad_development`.`tickets`.`group_id` in (1,50))","cost_info":{"read_cost":"383475.28","eval_cost":"4327.71","prefix_cost":"387803.00","data_read_per_join":"89M"},"used_columns":["id","group_id","title","updated_at"],"attached_condition":"(`zammad_development`.`tickets`.`title` like '%ticket with corret ticket id testagent211520689%')"}}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` WHERE (tickets.customer_id = 300) AND (`tickets`.`title` LIKE ('%ticket with corret ticket id testme989843318%')) ORDER BY `tickets`.`updated_at` desc LIMIT 50 OFFSET 0","table":"tickets","md5":"d991e5afe7b10027dd263ddf5ad15fd4","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":4.937500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"11.11","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 300)","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"239"},"used_columns":["id","title","customer_id","updated_at"],"attached_condition":"(`zammad_development`.`tickets`.`title` like '%ticket with corret ticket id testme989843318%')"}}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_time_accountings` WHERE `ticket_time_accountings`.`ticket_id` = 121","table":"ticket_time_accountings","md5":"06d30b602ab46e2e00e6eed03cdf5262","messages":[{"tag":"access_type_ref","table_size":0,"table":"ticket_time_accountings","cost":2.5e-07,"rows_read":1,"index":"index_ticket_time_accountings_on_ticket_id","index_used":["ticket_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_time_accountings","access_type":"ref","possible_keys":["index_ticket_time_accountings_on_ticket_id"],"key":"index_ticket_time_accountings_on_ticket_id","used_key_parts":["ticket_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["ticket_id"]}}},"backtrace":["app/models/application_model/can_associations.rb:200:in `block in attributes_with_association_names'","app/models/application_model/can_associations.rb:182:in `map'","app/models/application_model/can_associations.rb:182:in `attributes_with_association_names'","app/controllers/tickets_controller.rb:61:in `show'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`created_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,72)) AND ((tickets.title LIKE '%ticket pagination 94640617%' OR tickets.number LIKE '%ticket pagination 94640617%' OR ticket_articles.body LIKE '%ticket pagination 94640617%' OR ticket_articles.from LIKE '%ticket pagination 94640617%' OR ticket_articles.to LIKE '%ticket pagination 94640617%' OR ticket_articles.subject LIKE '%ticket pagination 94640617%')) ORDER BY `tickets`.`created_at` asc LIMIT 40 OFFSET 0","table":"tickets","md5":"d78444b75d8c0e22363d14abba4cbb61","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":36,"cost":1.4062500000000001e-05}],"cost":1.5562500000000002e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_created_at","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title","created_at"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,72)) and ((`zammad_development`.`tickets`.`title` like '%ticket pagination 94640617%') or (`zammad_development`.`tickets`.`number` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`body` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`from` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`to` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`subject` like '%ticket pagination 94640617%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`title` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,72)) AND ((tickets.title LIKE '%ticket pagination 94640617%' OR tickets.number LIKE '%ticket pagination 94640617%' OR ticket_articles.body LIKE '%ticket pagination 94640617%' OR ticket_articles.from LIKE '%ticket pagination 94640617%' OR ticket_articles.to LIKE '%ticket pagination 94640617%' OR ticket_articles.subject LIKE '%ticket pagination 94640617%')) ORDER BY `tickets`.`title` asc LIMIT 40 OFFSET 0","table":"tickets","md5":"343e600c87799c1acea81af68729d578","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":54,"cost":2.109375e-05}],"cost":2.259375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_title","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,72)) and ((`zammad_development`.`tickets`.`title` like '%ticket pagination 94640617%') or (`zammad_development`.`tickets`.`number` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`body` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`from` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`to` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`subject` like '%ticket pagination 94640617%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`title` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,72)) AND ((tickets.title LIKE '%ticket pagination 94640617%' OR tickets.number LIKE '%ticket pagination 94640617%' OR ticket_articles.body LIKE '%ticket pagination 94640617%' OR ticket_articles.from LIKE '%ticket pagination 94640617%' OR ticket_articles.to LIKE '%ticket pagination 94640617%' OR ticket_articles.subject LIKE '%ticket pagination 94640617%')) ORDER BY `tickets`.`title` desc LIMIT 40 OFFSET 0","table":"tickets","md5":"dcae44535995ea190e93c6537ee44da9","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":54,"cost":2.109375e-05}],"cost":2.259375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_title","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,72)) and ((`zammad_development`.`tickets`.`title` like '%ticket pagination 94640617%') or (`zammad_development`.`tickets`.`number` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`body` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`from` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`to` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`subject` like '%ticket pagination 94640617%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`created_at`, `tickets`.`updated_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,72)) AND ((tickets.title LIKE '%ticket pagination 94640617%' OR tickets.number LIKE '%ticket pagination 94640617%' OR ticket_articles.body LIKE '%ticket pagination 94640617%' OR ticket_articles.from LIKE '%ticket pagination 94640617%' OR ticket_articles.to LIKE '%ticket pagination 94640617%' OR ticket_articles.subject LIKE '%ticket pagination 94640617%')) ORDER BY `tickets`.`created_at` asc, `tickets`.`updated_at` asc LIMIT 40 OFFSET 0","table":"tickets","md5":"b97700381b0e6f9aeaad86b76376a08d","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":60,"cost":2.34375e-05}],"cost":2.49375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title","created_at","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,72)) and ((`zammad_development`.`tickets`.`title` like '%ticket pagination 94640617%') or (`zammad_development`.`tickets`.`number` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`body` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`from` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`to` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`subject` like '%ticket pagination 94640617%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`created_at`, `tickets`.`updated_at` FROM `tickets` INNER JOIN `ticket_articles` ON `ticket_articles`.`ticket_id` = `tickets`.`id` WHERE (group_id IN (1,72)) AND ((tickets.title LIKE '%ticket pagination 94640617%' OR tickets.number LIKE '%ticket pagination 94640617%' OR ticket_articles.body LIKE '%ticket pagination 94640617%' OR ticket_articles.from LIKE '%ticket pagination 94640617%' OR ticket_articles.to LIKE '%ticket pagination 94640617%' OR ticket_articles.subject LIKE '%ticket pagination 94640617%')) ORDER BY `tickets`.`created_at` desc, `tickets`.`updated_at` asc LIMIT 40 OFFSET 0","table":"tickets","md5":"207cc6093e33825d3477d1c932d1c8c2","messages":[{"tag":"access_type_tablescan","table_size":3,"table":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":null,"index_used":null},{"tag":"join_type_eq_ref","table_size":1000000,"table":"tickets","join_to":"ticket_articles","cost":7.5e-07,"rows_read":3,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":3,"result_bytes":60,"cost":2.34375e-05}],"cost":2.49375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.74"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"duplicates_removal":{"using_temporary_table":true,"using_filesort":false,"cost_info":{"sort_cost":"1.50"},"nested_loop":[{"table":{"table_name":"ticket_articles","access_type":"ALL","possible_keys":["index_ticket_articles_on_ticket_id"],"rows_examined_per_scan":3,"rows_produced_per_join":3,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.30","prefix_cost":"0.55","data_read_per_join":"189K"},"used_columns":["id","ticket_id","from","to","subject","body"]}},{"table":{"table_name":"tickets","access_type":"eq_ref","possible_keys":["PRIMARY","index_tickets_on_group_id","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.ticket_articles.ticket_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"50.00","cost_info":{"read_cost":"2.39","eval_cost":"0.15","prefix_cost":"3.24","data_read_per_join":"3K"},"used_columns":["id","group_id","number","title","created_at","updated_at"],"attached_condition":"((`zammad_development`.`tickets`.`group_id` in (1,72)) and ((`zammad_development`.`tickets`.`title` like '%ticket pagination 94640617%') or (`zammad_development`.`tickets`.`number` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`body` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`from` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`to` like '%ticket pagination 94640617%') or (`zammad_development`.`ticket_articles`.`subject` like '%ticket pagination 94640617%')))"}}]}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/tickets_controller.rb:447:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`created_at` FROM `tickets` FORCE INDEX(`index_tickets_on_customer_id`) WHERE (group_id IN (1,74)) AND (`tickets`.`state_id` IN (4) AND `tickets`.`customer_id` IN (332)) ORDER BY `tickets`.`created_at` desc LIMIT 100 OFFSET 0","table":"tickets","md5":"cbcc3bb0deb6b517b5ef980bb45778f5","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":4.937500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id","index_tickets_on_created_at"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"20.00","index_condition":"(`zammad_development`.`tickets`.`customer_id` <=> 332)","cost_info":{"read_cost":"0.80","eval_cost":"0.02","prefix_cost":"0.90","data_read_per_join":"432"},"used_columns":["id","group_id","state_id","customer_id","created_at"],"attached_condition":"((`zammad_development`.`tickets`.`state_id` = 4) and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/concerns/ticket_stats.rb:7:in `ticket_ids_and_assets'","app/controllers/tickets_controller.rb:544:in `block in stats'","app/controllers/tickets_controller.rb:543:in `each'","app/controllers/tickets_controller.rb:543:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (created_at > '2019-2-01 00:00:00' AND created_at < '2019-2-28 00:00:00') AND (group_id IN (1,74)) AND `tickets`.`customer_id` = 332","table":"tickets","md5":"4c611c4e918692d9b7c1825303669b28","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_group_id","index_tickets_on_customer_id","index_tickets_on_created_at","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.80","eval_cost":"0.03","prefix_cost":"0.90","data_read_per_join":"540"},"used_columns":["group_id","customer_id","created_at"],"attached_condition":"((`zammad_development`.`tickets`.`created_at` > '2019-2-01 00:00:00') and (`zammad_development`.`tickets`.`created_at` < '2019-2-28 00:00:00') and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}},"backtrace":["app/controllers/concerns/ticket_stats.rb:30:in `block in ticket_stats_last_year'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","app/controllers/concerns/ticket_stats.rb:21:in `ticket_stats_last_year'","app/controllers/tickets_controller.rb:551:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (close_at > '2019-2-01 00:00:00' AND close_at < '2019-2-28 00:00:00') AND (group_id IN (1,74)) AND `tickets`.`customer_id` = 332","table":"tickets","md5":"4a579dc7e6af39ff20d77667b0a85d8e","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_group_id","index_tickets_on_customer_id","index_tickets_on_close_at","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.00","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"108"},"used_columns":["group_id","customer_id","close_at"],"attached_condition":"((`zammad_development`.`tickets`.`close_at` > '2019-2-01 00:00:00') and (`zammad_development`.`tickets`.`close_at` < '2019-2-28 00:00:00') and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}},"backtrace":["app/controllers/concerns/ticket_stats.rb:36:in `block in ticket_stats_last_year'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","app/controllers/concerns/ticket_stats.rb:21:in `ticket_stats_last_year'","app/controllers/tickets_controller.rb:551:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`created_at` FROM `tickets` FORCE INDEX(`fk_rails_b62b455ecb`) WHERE (group_id IN (1,74)) AND (`tickets`.`state_id` IN (4) AND `tickets`.`organization_id` IN (82)) ORDER BY `tickets`.`created_at` desc LIMIT 100 OFFSET 0","table":"tickets","md5":"67c1e5c8c09545cf3085aaeb888d31a3","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"fk_rails_b62b455ecb","index_used":["organization_id"]},{"tag":"retsize","result_size":1,"result_bytes":12,"cost":4.6875000000000004e-06}],"cost":4.937500000000001e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_created_at","fk_rails_b62b455ecb"],"key":"fk_rails_b62b455ecb","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"20.00","index_condition":"(`zammad_development`.`tickets`.`organization_id` <=> 82)","cost_info":{"read_cost":"0.80","eval_cost":"0.02","prefix_cost":"0.90","data_read_per_join":"432"},"used_columns":["id","group_id","state_id","organization_id","created_at"],"attached_condition":"((`zammad_development`.`tickets`.`state_id` = 4) and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/concerns/ticket_stats.rb:7:in `ticket_ids_and_assets'","app/controllers/tickets_controller.rb:586:in `block in stats'","app/controllers/tickets_controller.rb:585:in `each'","app/controllers/tickets_controller.rb:585:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (created_at > '2019-2-01 00:00:00' AND created_at < '2019-2-28 00:00:00') AND (group_id IN (1,74)) AND `tickets`.`organization_id` = 82","table":"tickets","md5":"2dc9121b1c75c25b65b69f2d9e332fb7","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"fk_rails_b62b455ecb","index_used":["organization_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_group_id","index_tickets_on_created_at","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb"],"key":"fk_rails_b62b455ecb","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"25.00","cost_info":{"read_cost":"0.80","eval_cost":"0.03","prefix_cost":"0.90","data_read_per_join":"540"},"used_columns":["group_id","organization_id","created_at"],"attached_condition":"((`zammad_development`.`tickets`.`created_at` > '2019-2-01 00:00:00') and (`zammad_development`.`tickets`.`created_at` < '2019-2-28 00:00:00') and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}},"backtrace":["app/controllers/concerns/ticket_stats.rb:30:in `block in ticket_stats_last_year'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","app/controllers/concerns/ticket_stats.rb:21:in `ticket_stats_last_year'","app/controllers/tickets_controller.rb:593:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (close_at > '2019-2-01 00:00:00' AND close_at < '2019-2-28 00:00:00') AND (group_id IN (1,74)) AND `tickets`.`organization_id` = 82","table":"tickets","md5":"cc8eaf80f27e03c027684268e055e069","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"fk_rails_b62b455ecb","index_used":["organization_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.89"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_group_id","index_tickets_on_close_at","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id","fk_rails_b62b455ecb"],"key":"fk_rails_b62b455ecb","used_key_parts":["organization_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"5.00","cost_info":{"read_cost":"0.80","eval_cost":"0.01","prefix_cost":"0.90","data_read_per_join":"108"},"used_columns":["group_id","organization_id","close_at"],"attached_condition":"((`zammad_development`.`tickets`.`close_at` > '2019-2-01 00:00:00') and (`zammad_development`.`tickets`.`close_at` < '2019-2-28 00:00:00') and (`zammad_development`.`tickets`.`group_id` in (1,74)))"}}},"backtrace":["app/controllers/concerns/ticket_stats.rb:36:in `block in ticket_stats_last_year'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","gems/activesupport-5.1.6.1/lib/active_support/core_ext/range/each.rb:5:in `each'","app/controllers/concerns/ticket_stats.rb:21:in `ticket_stats_last_year'","app/controllers/tickets_controller.rb:593:in `stats'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'"]},{"sql":"SELECT `ticket_time_accountings`.`ticket_id`, `ticket_time_accountings`.`time_unit`, `ticket_time_accountings`.`created_by_id` FROM `ticket_time_accountings` WHERE (created_at >= '2019-02-01 00:00:00' AND created_at <= '2019-02-28 23:59:59.999999')","table":"ticket_time_accountings","md5":"20993079b1a92125b688420038755bfc","messages":[{"tag":"access_type_tablescan","table_size":0,"table":"ticket_time_accountings","cost":0.0,"rows_read":0,"index":null,"index_used":null},{"tag":"retsize","result_size":0,"result_bytes":0,"cost":0.0}],"cost":0.0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"ticket_time_accountings","access_type":"ALL","rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"40"},"used_columns":["ticket_id","time_unit","created_by_id","created_at"],"attached_condition":"((`zammad_development`.`ticket_time_accountings`.`created_at` >= '2019-02-01 00:00:00') and (`zammad_development`.`ticket_time_accountings`.`created_at` <= '2019-02-28 23:59:59.999999'))"}}},"backtrace":["app/controllers/time_accountings_controller.rb:15:in `by_ticket'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `organizations`.* FROM `organizations` WHERE `organizations`.`id` IN (93, 94)","table":"organizations","md5":"59f7dde4e279c3ed435c02e08db6fb06","messages":[{"tag":"access_type_range","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":48,"cost":1.8750000000000002e-05}],"cost":1.9e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"table":{"table_name":"organizations","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"31K"},"used_columns":["id","name","shared","domain","domain_assignment","active","note","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`organizations`.`id` in (93,94))"}}},"backtrace":["app/models/application_model/can_associations.rb:102:in `block in associations_from_param'","app/models/application_model/can_associations.rb:63:in `map'","app/models/application_model/can_associations.rb:63:in `associations_from_param'","app/controllers/users_controller.rb:279:in `block in update'","gems/activerecord-5.1.6.1/lib/active_record/locking/pessimistic.rb:81:in `block in with_lock'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'","gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'",".rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'"]},{"sql":"SELECT COUNT(*) FROM `macros` WHERE (created_by_id = 437)","table":"macros","md5":"20957ad75570aecc0d0a447442890285","messages":[{"tag":"access_type_ref","table_size":1,"table":"macros","cost":2.5e-07,"rows_read":1,"index":"fk_rails_18961fdc52","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"macros","access_type":"ref","possible_keys":["fk_rails_18961fdc52"],"key":"fk_rails_18961fdc52","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `macros` WHERE (updated_by_id = 437)","table":"macros","md5":"2b22cfd613bba4da2fc3d4f0f2755b18","messages":[{"tag":"access_type_ref","table_size":1,"table":"macros","cost":2.5e-07,"rows_read":1,"index":"fk_rails_84f97aa218","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"macros","access_type":"ref","possible_keys":["fk_rails_84f97aa218"],"key":"fk_rails_84f97aa218","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `triggers` WHERE (created_by_id = 437)","table":"triggers","md5":"e073c01fe12b720a620ac7afa5f7fd4e","messages":[{"tag":"access_type_ref","table_size":3,"table":"triggers","cost":7.5e-07,"rows_read":3,"index":"fk_rails_35c0846653","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"triggers","access_type":"ref","possible_keys":["fk_rails_35c0846653"],"key":"fk_rails_35c0846653","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `triggers` WHERE (updated_by_id = 437)","table":"triggers","md5":"af29de3127330afc0ff9380805af1269","messages":[{"tag":"access_type_ref","table_size":3,"table":"triggers","cost":7.5e-07,"rows_read":3,"index":"fk_rails_7f3d25350f","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"triggers","access_type":"ref","possible_keys":["fk_rails_7f3d25350f"],"key":"fk_rails_7f3d25350f","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `histories` WHERE (created_by_id = 437)","table":"histories","md5":"d8f65a533191e82fca45be8a882f5870","messages":[{"tag":"access_type_ref","table_size":10000000,"table":"histories","cost":2.4999999999999998e-05,"rows_read":100,"index":"index_histories_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.4999999999999998e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"histories","access_type":"ref","possible_keys":["index_histories_on_created_by_id"],"key":"index_histories_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `user_devices` WHERE (user_id = 437)","table":"user_devices","md5":"48f66d168e55c6bdc7f9ce02b4335263","messages":[{"tag":"access_type_ref","table_size":0,"table":"user_devices","cost":2.5e-07,"rows_read":1,"index":"index_user_devices_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"user_devices","access_type":"ref","possible_keys":["index_user_devices_on_user_id"],"key":"index_user_devices_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"18K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tags` WHERE (created_by_id = 437)","table":"tags","md5":"ddb73d2a6b75719038dc18ff8ae25e30","messages":[{"tag":"access_type_ref","table_size":1,"table":"tags","cost":2.5e-07,"rows_read":1,"index":"fk_rails_5f245fd6a7","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tags","access_type":"ref","possible_keys":["fk_rails_5f245fd6a7"],"key":"fk_rails_5f245fd6a7","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `http_logs` WHERE (created_by_id = 437)","table":"http_logs","md5":"03ab9e57f4afbd4908c7175d703acf32","messages":[{"tag":"access_type_ref","table_size":0,"table":"http_logs","cost":2.5e-07,"rows_read":1,"index":"index_http_logs_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"http_logs","access_type":"ref","possible_keys":["index_http_logs_on_created_by_id"],"key":"index_http_logs_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"60K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `http_logs` WHERE (updated_by_id = 437)","table":"http_logs","md5":"a219508af2e5ce484ee4fc5e0ae0a622","messages":[{"tag":"access_type_ref","table_size":0,"table":"http_logs","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0a97b58d1a","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"http_logs","access_type":"ref","possible_keys":["fk_rails_0a97b58d1a"],"key":"fk_rails_0a97b58d1a","used_key_parts":["updated_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"60K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `schedulers` WHERE (created_by_id = 437)","table":"schedulers","md5":"4e2c41f1c64466b399e286a3c1632b88","messages":[{"tag":"access_type_ref","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":"fk_rails_e0c99c2069","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"schedulers","access_type":"ref","possible_keys":["fk_rails_e0c99c2069"],"key":"fk_rails_e0c99c2069","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"4K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `schedulers` WHERE (updated_by_id = 437)","table":"schedulers","md5":"b062a0745f67cc6c164f2e97694f46c3","messages":[{"tag":"access_type_ref","table_size":21,"table":"schedulers","cost":5.25e-06,"rows_read":21,"index":"fk_rails_08966259e8","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"schedulers","access_type":"ref","possible_keys":["fk_rails_08966259e8"],"key":"fk_rails_08966259e8","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"4K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `postmaster_filters` WHERE (created_by_id = 437)","table":"postmaster_filters","md5":"33aa1d8468d8de7c118a52800fdd0e18","messages":[{"tag":"access_type_ref","table_size":0,"table":"postmaster_filters","cost":2.5e-07,"rows_read":1,"index":"fk_rails_99ae723fc6","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"postmaster_filters","access_type":"ref","possible_keys":["fk_rails_99ae723fc6"],"key":"fk_rails_99ae723fc6","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `postmaster_filters` WHERE (updated_by_id = 437)","table":"postmaster_filters","md5":"aeea0c05137bc3fa2191fb9e3862482e","messages":[{"tag":"access_type_ref","table_size":0,"table":"postmaster_filters","cost":2.5e-07,"rows_read":1,"index":"fk_rails_4b17873e0f","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"postmaster_filters","access_type":"ref","possible_keys":["fk_rails_4b17873e0f"],"key":"fk_rails_4b17873e0f","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `signatures` WHERE (created_by_id = 437)","table":"signatures","md5":"13506981cf37bcdeddc4fc786705cd86","messages":[{"tag":"access_type_ref","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":"fk_rails_997a237d5e","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"signatures","access_type":"ref","possible_keys":["fk_rails_997a237d5e"],"key":"fk_rails_997a237d5e","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `signatures` WHERE (updated_by_id = 437)","table":"signatures","md5":"1d2edef0e943279985f643b99ce666db","messages":[{"tag":"access_type_ref","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":"fk_rails_82877eeea3","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"signatures","access_type":"ref","possible_keys":["fk_rails_82877eeea3"],"key":"fk_rails_82877eeea3","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_agents` WHERE (created_by_id = 437)","table":"chat_agents","md5":"97d873badec39e1d3993fe7e496d0733","messages":[{"tag":"access_type_const","table":"chat_agents"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_agents` WHERE (updated_by_id = 437)","table":"chat_agents","md5":"bcac91eb4c96ab5db7d2a387575481d7","messages":[{"tag":"access_type_const","table":"chat_agents"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_messages` WHERE (created_by_id = 437)","table":"chat_messages","md5":"b9393ea65075a3e18f81e3dd2b8e3127","messages":[{"tag":"access_type_ref","table_size":0,"table":"chat_messages","cost":2.5e-07,"rows_read":1,"index":"fk_rails_af8ea0a844","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chat_messages","access_type":"ref","possible_keys":["fk_rails_af8ea0a844"],"key":"fk_rails_af8ea0a844","used_key_parts":["created_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_sessions` WHERE (user_id = 437)","table":"chat_sessions","md5":"0b6b14607c80ab96a4960b59c7237308","messages":[{"tag":"access_type_ref","table_size":0,"table":"chat_sessions","cost":2.5e-07,"rows_read":1,"index":"index_chat_sessions_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chat_sessions","access_type":"ref","possible_keys":["index_chat_sessions_on_user_id"],"key":"index_chat_sessions_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_sessions` WHERE (created_by_id = 437)","table":"chat_sessions","md5":"ed1b5affc8463a26abdb632b16c7aafe","messages":[{"tag":"access_type_ref","table_size":0,"table":"chat_sessions","cost":2.5e-07,"rows_read":1,"index":"fk_rails_9b5b542892","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chat_sessions","access_type":"ref","possible_keys":["fk_rails_9b5b542892"],"key":"fk_rails_9b5b542892","used_key_parts":["created_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chat_sessions` WHERE (updated_by_id = 437)","table":"chat_sessions","md5":"ae2eb706e6cc785180e407e73c94618d","messages":[{"tag":"access_type_ref","table_size":0,"table":"chat_sessions","cost":2.5e-07,"rows_read":1,"index":"fk_rails_dab338cf4e","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chat_sessions","access_type":"ref","possible_keys":["fk_rails_dab338cf4e"],"key":"fk_rails_dab338cf4e","used_key_parts":["updated_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `object_manager_attributes` WHERE (created_by_id = 437)","table":"object_manager_attributes","md5":"b7fd53fd1b00fc8f5849d6fb698bbab0","messages":[{"tag":"access_type_ref","table_size":48,"table":"object_manager_attributes","cost":1.2e-05,"rows_read":48,"index":"fk_rails_acacd17a49","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.2e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"object_manager_attributes","access_type":"ref","possible_keys":["fk_rails_acacd17a49"],"key":"fk_rails_acacd17a49","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"7K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `object_manager_attributes` WHERE (updated_by_id = 437)","table":"object_manager_attributes","md5":"777e3be0137bfe32222cf67a6917f2e8","messages":[{"tag":"access_type_ref","table_size":48,"table":"object_manager_attributes","cost":1.2e-05,"rows_read":48,"index":"fk_rails_e812039563","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.2e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"object_manager_attributes","access_type":"ref","possible_keys":["fk_rails_e812039563"],"key":"fk_rails_e812039563","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"7K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `recent_views` WHERE (created_by_id = 437)","table":"recent_views","md5":"a2991262357fd0a9b01e0dc84856228f","messages":[{"tag":"access_type_ref","table_size":3,"table":"recent_views","cost":7.5e-07,"rows_read":3,"index":"index_recent_views_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"recent_views","access_type":"ref","possible_keys":["index_recent_views_on_created_by_id"],"key":"index_recent_views_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"32"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `cti_caller_ids` WHERE (user_id = 437)","table":"cti_caller_ids","md5":"0cb8ce18579aeb791f89494d7fa9a9f2","messages":[{"tag":"access_type_ref","table_size":0,"table":"cti_caller_ids","cost":2.5e-07,"rows_read":1,"index":"fk_rails_f03ef195fa","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"cti_caller_ids","access_type":"ref","possible_keys":["fk_rails_f03ef195fa"],"key":"fk_rails_f03ef195fa","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `slas` WHERE (created_by_id = 437)","table":"slas","md5":"f5cc0d41425268f9b5c8312a424c1c28","messages":[{"tag":"access_type_ref","table_size":0,"table":"slas","cost":2.5e-07,"rows_read":1,"index":"fk_rails_15319a5af4","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"slas","access_type":"ref","possible_keys":["fk_rails_15319a5af4"],"key":"fk_rails_15319a5af4","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `slas` WHERE (updated_by_id = 437)","table":"slas","md5":"f4459ce94f9cd03dd5ce3e64c0801719","messages":[{"tag":"access_type_ref","table_size":0,"table":"slas","cost":2.5e-07,"rows_read":1,"index":"fk_rails_5a768af5b2","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"slas","access_type":"ref","possible_keys":["fk_rails_5a768af5b2"],"key":"fk_rails_5a768af5b2","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"512"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `translations` WHERE (created_by_id = 437)","table":"translations","md5":"2f79e953f0a0f8c5ddfbc4ec1329a6ee","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.013077,"rows_read":52308,"index":"fk_rails_d6e6d9635d","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.013077,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.08"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["fk_rails_d6e6d9635d"],"key":"fk_rails_d6e6d9635d","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.98","eval_cost":"0.10","prefix_cost":"1.08","data_read_per_join":"4K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `translations` WHERE (updated_by_id = 437)","table":"translations","md5":"a1ebef0b0f10b0c48448b9c797aa5252","messages":[{"tag":"access_type_ref","table_size":52308,"table":"translations","cost":0.013077,"rows_read":52308,"index":"fk_rails_8cb1380a17","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.013077,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.08"},"table":{"table_name":"translations","access_type":"ref","possible_keys":["fk_rails_8cb1380a17"],"key":"fk_rails_8cb1380a17","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.98","eval_cost":"0.10","prefix_cost":"1.08","data_read_per_join":"4K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `templates` WHERE (user_id = 437)","table":"templates","md5":"c673c76a9d2efc4f7e7396c2382bbc84","messages":[{"tag":"access_type_ref","table_size":0,"table":"templates","cost":2.5e-07,"rows_read":1,"index":"index_templates_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"templates","access_type":"ref","possible_keys":["index_templates_on_user_id"],"key":"index_templates_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"800"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `templates` WHERE (created_by_id = 437)","table":"templates","md5":"6c21e9b826e3f8cad7b09c58eac50954","messages":[{"tag":"access_type_ref","table_size":0,"table":"templates","cost":2.5e-07,"rows_read":1,"index":"fk_rails_989d730f4b","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"templates","access_type":"ref","possible_keys":["fk_rails_989d730f4b"],"key":"fk_rails_989d730f4b","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"800"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `templates` WHERE (updated_by_id = 437)","table":"templates","md5":"fee0527111aa15287fa0c9dc4532f426","messages":[{"tag":"access_type_ref","table_size":0,"table":"templates","cost":2.5e-07,"rows_read":1,"index":"fk_rails_4688f6dd32","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"templates","access_type":"ref","possible_keys":["fk_rails_4688f6dd32"],"key":"fk_rails_4688f6dd32","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"800"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `groups` WHERE (created_by_id = 437)","table":"groups","md5":"003383bb721d3f8e827fdb3f7009c4d4","messages":[{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_7bec5aff4f","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_7bec5aff4f"],"key":"fk_rails_7bec5aff4f","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `groups` WHERE (updated_by_id = 437)","table":"groups","md5":"6ebfeaae6358f9da7907bde7425e936d","messages":[{"tag":"access_type_ref","table_size":1,"table":"groups","cost":2.5e-07,"rows_read":1,"index":"fk_rails_55ff2495b5","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups","access_type":"ref","possible_keys":["fk_rails_55ff2495b5"],"key":"fk_rails_55ff2495b5","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `stats_stores` WHERE (created_by_id = 437)","table":"stats_stores","md5":"534ba7c437cbdc6dbda4a02034d62cdd","messages":[{"tag":"access_type_ref","table_size":0,"table":"stats_stores","cost":2.5e-07,"rows_read":1,"index":"index_stats_stores_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stats_stores","access_type":"ref","possible_keys":["index_stats_stores_on_created_by_id"],"key":"index_stats_stores_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `overviews` WHERE (created_by_id = 437)","table":"overviews","md5":"0d037b5a269138edf02cdee567589d3d","messages":[{"tag":"access_type_ref","table_size":9,"table":"overviews","cost":2.25e-06,"rows_read":9,"index":"fk_rails_a12668341b","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"overviews","access_type":"ref","possible_keys":["fk_rails_a12668341b"],"key":"fk_rails_a12668341b","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"13K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `overviews` WHERE (updated_by_id = 437)","table":"overviews","md5":"416c46fe8ae5c23c1892531c43d8f0f5","messages":[{"tag":"access_type_ref","table_size":9,"table":"overviews","cost":2.25e-06,"rows_read":9,"index":"fk_rails_13fe2fde45","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.25e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"overviews","access_type":"ref","possible_keys":["fk_rails_13fe2fde45"],"key":"fk_rails_13fe2fde45","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"13K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `text_modules` WHERE (user_id = 437)","table":"text_modules","md5":"154a2d15dda3abbc7b7566af3368a834","messages":[{"tag":"access_type_ref","table_size":27,"table":"text_modules","cost":6.75e-06,"rows_read":27,"index":"index_text_modules_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":6.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"text_modules","access_type":"ref","possible_keys":["index_text_modules_on_user_id"],"key":"index_text_modules_on_user_id","used_key_parts":["user_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `text_modules` WHERE (created_by_id = 437)","table":"text_modules","md5":"dc54b3da04044f0a3f7818693af99e42","messages":[{"tag":"access_type_ref","table_size":27,"table":"text_modules","cost":6.75e-06,"rows_read":27,"index":"fk_rails_84148bfddb","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":6.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"text_modules","access_type":"ref","possible_keys":["fk_rails_84148bfddb"],"key":"fk_rails_84148bfddb","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `text_modules` WHERE (updated_by_id = 437)","table":"text_modules","md5":"44c6d5df4304928eff93447d716496fd","messages":[{"tag":"access_type_ref","table_size":27,"table":"text_modules","cost":6.75e-06,"rows_read":27,"index":"fk_rails_343b2c0fce","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":6.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"text_modules","access_type":"ref","possible_keys":["fk_rails_343b2c0fce"],"key":"fk_rails_343b2c0fce","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"2K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `calendars` WHERE (created_by_id = 437)","table":"calendars","md5":"f5e70318748c9812df12594d9f06605c","messages":[{"tag":"access_type_ref","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":"fk_rails_2a2c81de1a","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"calendars","access_type":"ref","possible_keys":["fk_rails_2a2c81de1a"],"key":"fk_rails_2a2c81de1a","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"11K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `calendars` WHERE (updated_by_id = 437)","table":"calendars","md5":"4a44bbe289c50a552407bf58a8d5ab8d","messages":[{"tag":"access_type_ref","table_size":1,"table":"calendars","cost":2.5e-07,"rows_read":1,"index":"fk_rails_1923375e08","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"calendars","access_type":"ref","possible_keys":["fk_rails_1923375e08"],"key":"fk_rails_1923375e08","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"11K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `email_addresses` WHERE (created_by_id = 437)","table":"email_addresses","md5":"31189881a4835ba9b26400d21c8213e5","messages":[{"tag":"access_type_ref","table_size":0,"table":"email_addresses","cost":2.5e-07,"rows_read":1,"index":"fk_rails_4f204b5369","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"email_addresses","access_type":"ref","possible_keys":["fk_rails_4f204b5369"],"key":"fk_rails_4f204b5369","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `email_addresses` WHERE (updated_by_id = 437)","table":"email_addresses","md5":"5caabc6187ae751e4178bf61dabb888b","messages":[{"tag":"access_type_ref","table_size":0,"table":"email_addresses","cost":2.5e-07,"rows_read":1,"index":"fk_rails_a24ae390cf","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"email_addresses","access_type":"ref","possible_keys":["fk_rails_a24ae390cf"],"key":"fk_rails_a24ae390cf","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `authorizations` WHERE (user_id = 437)","table":"authorizations","md5":"51fe34d7c8271d5a2986346cf7abeb12","messages":[{"tag":"access_type_ref","table_size":0,"table":"authorizations","cost":2.5e-07,"rows_read":1,"index":"index_authorizations_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"authorizations","access_type":"ref","possible_keys":["index_authorizations_on_user_id"],"key":"index_authorizations_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"10K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chats` WHERE (created_by_id = 437)","table":"chats","md5":"062911cb59e81bb3c5961543e71764f1","messages":[{"tag":"access_type_ref","table_size":1,"table":"chats","cost":2.5e-07,"rows_read":1,"index":"fk_rails_9053a479a7","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chats","access_type":"ref","possible_keys":["fk_rails_9053a479a7"],"key":"fk_rails_9053a479a7","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"45K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `chats` WHERE (updated_by_id = 437)","table":"chats","md5":"5dc945ba8342ad1995760a871e566648","messages":[{"tag":"access_type_ref","table_size":1,"table":"chats","cost":2.5e-07,"rows_read":1,"index":"fk_rails_cb3fe7fa69","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"chats","access_type":"ref","possible_keys":["fk_rails_cb3fe7fa69"],"key":"fk_rails_cb3fe7fa69","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"45K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `karma_activity_logs` WHERE (user_id = 437)","table":"karma_activity_logs","md5":"01f44dc9dfa3cc09a04a7ec4b2975fef","messages":[{"tag":"access_type_ref","table_size":0,"table":"karma_activity_logs","cost":2.5e-07,"rows_read":1,"index":"index_karma_activity_logs_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"karma_activity_logs","access_type":"ref","possible_keys":["index_karma_activity_logs_on_user_id"],"key":"index_karma_activity_logs_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"48"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `karma_users` WHERE (user_id = 437)","table":"karma_users","md5":"91c735b7dcdbc4a23dc5d92fae28a2b1","messages":[{"tag":"access_type_const","table":"karma_users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `avatars` WHERE (created_by_id = 437)","table":"avatars","md5":"fc314b72cb1876f7a29c450f7f366d9a","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":5.0e-07,"rows_read":2,"index":"fk_rails_7f23a117cf","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"avatars","access_type":"ref","possible_keys":["fk_rails_7f23a117cf"],"key":"fk_rails_7f23a117cf","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `avatars` WHERE (updated_by_id = 437)","table":"avatars","md5":"7da4f75ce73cd983f6f3317fbe43a42d","messages":[{"tag":"access_type_ref","table_size":4,"table":"avatars","cost":5.0e-07,"rows_read":2,"index":"fk_rails_36592d9368","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"avatars","access_type":"ref","possible_keys":["fk_rails_36592d9368"],"key":"fk_rails_36592d9368","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `roles` WHERE (created_by_id = 437)","table":"roles","md5":"8451a61298c1fa217a17cf2e35fac710","messages":[{"tag":"access_type_ref","table_size":3,"table":"roles","cost":7.5e-07,"rows_read":3,"index":"fk_rails_b41292c88f","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"roles","access_type":"ref","possible_keys":["fk_rails_b41292c88f"],"key":"fk_rails_b41292c88f","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `roles` WHERE (updated_by_id = 437)","table":"roles","md5":"8d9baac009d62ecee47b2c531e2e38be","messages":[{"tag":"access_type_ref","table_size":3,"table":"roles","cost":7.5e-07,"rows_read":3,"index":"fk_rails_e85422db7e","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"roles","access_type":"ref","possible_keys":["fk_rails_e85422db7e"],"key":"fk_rails_e85422db7e","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `jobs` WHERE (created_by_id = 437)","table":"jobs","md5":"3dae7248ac1132f8ae40024a9fad71f0","messages":[{"tag":"access_type_ref","table_size":0,"table":"jobs","cost":2.5e-07,"rows_read":1,"index":"fk_rails_c4f56411f8","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"jobs","access_type":"ref","possible_keys":["fk_rails_c4f56411f8"],"key":"fk_rails_c4f56411f8","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"9K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `jobs` WHERE (updated_by_id = 437)","table":"jobs","md5":"5411e3bbf63317a35d6bc5805c1ca74c","messages":[{"tag":"access_type_ref","table_size":0,"table":"jobs","cost":2.5e-07,"rows_read":1,"index":"fk_rails_3e355905b6","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"jobs","access_type":"ref","possible_keys":["fk_rails_3e355905b6"],"key":"fk_rails_3e355905b6","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"9K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `organizations` WHERE (created_by_id = 437)","table":"organizations","md5":"6e660c6919b210916174f6ce812601b1","messages":[{"tag":"access_type_ref","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"fk_rails_edec76c076","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"organizations","access_type":"ref","possible_keys":["fk_rails_edec76c076"],"key":"fk_rails_edec76c076","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `organizations` WHERE (updated_by_id = 437)","table":"organizations","md5":"9eaa47b7a587af92867474edbbffa50a","messages":[{"tag":"access_type_ref","table_size":1,"table":"organizations","cost":2.5e-07,"rows_read":1,"index":"fk_rails_6b945c40b8","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"organizations","access_type":"ref","possible_keys":["fk_rails_6b945c40b8"],"key":"fk_rails_6b945c40b8","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"15K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `channels` WHERE (created_by_id = 437)","table":"channels","md5":"c6788fd30fb6039bb5aadfb873796cea","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"fk_rails_f1fc2a34ff","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["fk_rails_f1fc2a34ff"],"key":"fk_rails_f1fc2a34ff","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"6K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `channels` WHERE (updated_by_id = 437)","table":"channels","md5":"b2458c49a40a4c42f056aa03c832f92b","messages":[{"tag":"access_type_ref","table_size":2,"table":"channels","cost":5.0e-07,"rows_read":2,"index":"fk_rails_32268ed43d","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"channels","access_type":"ref","possible_keys":["fk_rails_32268ed43d"],"key":"fk_rails_32268ed43d","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"6K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE (created_by_id = 437)","table":"ticket_articles","md5":"c501aaa3675deaaca85e270135738e2b","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"index_ticket_articles_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["index_ticket_articles_on_created_by_id"],"key":"index_ticket_articles_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE (updated_by_id = 437)","table":"ticket_articles","md5":"0cacda3eb7e8dd0c6db1cb0ec0bf2d83","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"fk_rails_38b783461b","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["fk_rails_38b783461b"],"key":"fk_rails_38b783461b","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_states` WHERE (created_by_id = 437)","table":"ticket_states","md5":"0fc4cab86749216cbcddeb4c0803d8f7","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"fk_rails_2927b269ed","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["fk_rails_2927b269ed"],"key":"fk_rails_2927b269ed","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_states` WHERE (updated_by_id = 437)","table":"ticket_states","md5":"e8c54e3204ce299198a0995e35757757","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_states","cost":1.75e-06,"rows_read":7,"index":"fk_rails_4a7d116edc","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_states","access_type":"ref","possible_keys":["fk_rails_4a7d116edc"],"key":"fk_rails_4a7d116edc","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_time_accountings` WHERE (created_by_id = 437)","table":"ticket_time_accountings","md5":"4d67ac4c64ecc47d37c71e723f998a51","messages":[{"tag":"access_type_ref","table_size":0,"table":"ticket_time_accountings","cost":2.5e-07,"rows_read":1,"index":"index_ticket_time_accountings_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_time_accountings","access_type":"ref","possible_keys":["index_ticket_time_accountings_on_created_by_id"],"key":"index_ticket_time_accountings_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"40"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_state_types` WHERE (created_by_id = 437)","table":"ticket_state_types","md5":"8632588242eb6b8f09b24a07f7628a93","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_state_types","cost":1.75e-06,"rows_read":7,"index":"fk_rails_70faf2d7df","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_state_types","access_type":"ref","possible_keys":["fk_rails_70faf2d7df"],"key":"fk_rails_70faf2d7df","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_state_types` WHERE (updated_by_id = 437)","table":"ticket_state_types","md5":"21556810fd2e64bc8cbb23665cbe2524","messages":[{"tag":"access_type_ref","table_size":7,"table":"ticket_state_types","cost":1.75e-06,"rows_read":7,"index":"fk_rails_0b22ef689c","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.75e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_state_types","access_type":"ref","possible_keys":["fk_rails_0b22ef689c"],"key":"fk_rails_0b22ef689c","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_priorities` WHERE (created_by_id = 437)","table":"ticket_priorities","md5":"fc0a805c8d5d89c2caa7dd4d08614e70","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_priorities","cost":7.5e-07,"rows_read":3,"index":"fk_rails_7ba453ab6d","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_priorities","access_type":"ref","possible_keys":["fk_rails_7ba453ab6d"],"key":"fk_rails_7ba453ab6d","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_priorities` WHERE (updated_by_id = 437)","table":"ticket_priorities","md5":"2b76b25c7069c812d2c0f4da553ec6b8","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_priorities","cost":7.5e-07,"rows_read":3,"index":"fk_rails_d43af6872e","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_priorities","access_type":"ref","possible_keys":["fk_rails_d43af6872e"],"key":"fk_rails_d43af6872e","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_flags` WHERE (created_by_id = 437)","table":"ticket_flags","md5":"bd8ed9d3ca34b3ed10bc00d76fc7dd38","messages":[{"tag":"access_type_ref","table_size":0,"table":"ticket_flags","cost":2.5e-07,"rows_read":1,"index":"index_ticket_flags_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_flags","access_type":"ref","possible_keys":["index_ticket_flags_on_created_by_id"],"key":"index_ticket_flags_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"328"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `activity_streams` WHERE (created_by_id = 437)","table":"activity_streams","md5":"30ceec2d603045beefbfd0d587d6dd06","messages":[{"tag":"access_type_ref","table_size":6,"table":"activity_streams","cost":1.5e-06,"rows_read":6,"index":"index_activity_streams_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":1.5e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"activity_streams","access_type":"ref","possible_keys":["index_activity_streams_on_created_by_id"],"key":"index_activity_streams_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"48"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `online_notifications` WHERE (user_id = 437)","table":"online_notifications","md5":"143e21aec7a53c088e6a32bb3d0e0881","messages":[{"tag":"access_type_ref","table_size":0,"table":"online_notifications","cost":2.5e-07,"rows_read":1,"index":"index_online_notifications_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"online_notifications","access_type":"ref","possible_keys":["index_online_notifications_on_user_id"],"key":"index_online_notifications_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"48"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `online_notifications` WHERE (created_by_id = 437)","table":"online_notifications","md5":"59a02f31172510287964378663d5fa9a","messages":[{"tag":"access_type_ref","table_size":0,"table":"online_notifications","cost":2.5e-07,"rows_read":1,"index":"fk_rails_0c0055c5df","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"online_notifications","access_type":"ref","possible_keys":["fk_rails_0c0055c5df"],"key":"fk_rails_0c0055c5df","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"48"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `online_notifications` WHERE (updated_by_id = 437)","table":"online_notifications","md5":"0a9a68ac7c6cd7ce44062d14a9bfdc72","messages":[{"tag":"access_type_ref","table_size":0,"table":"online_notifications","cost":2.5e-07,"rows_read":1,"index":"fk_rails_ee155e3c0c","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"online_notifications","access_type":"ref","possible_keys":["fk_rails_ee155e3c0c"],"key":"fk_rails_ee155e3c0c","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"48"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `report_profiles` WHERE (created_by_id = 437)","table":"report_profiles","md5":"542b91d5ca78a9d8750ca25ba09c36a2","messages":[{"tag":"access_type_ref","table_size":1,"table":"report_profiles","cost":2.5e-07,"rows_read":1,"index":"fk_rails_c0dbdacc53","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"report_profiles","access_type":"ref","possible_keys":["fk_rails_c0dbdacc53"],"key":"fk_rails_c0dbdacc53","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"496"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `report_profiles` WHERE (updated_by_id = 437)","table":"report_profiles","md5":"d5aa72f617a6fc3dc74c9b71496b89cb","messages":[{"tag":"access_type_ref","table_size":1,"table":"report_profiles","cost":2.5e-07,"rows_read":1,"index":"fk_rails_214a4c247b","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"report_profiles","access_type":"ref","possible_keys":["fk_rails_214a4c247b"],"key":"fk_rails_214a4c247b","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"496"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tokens` WHERE (user_id = 437)","table":"tokens","md5":"e73526139b2e35e4d4d9ca1135a12dbf","messages":[{"tag":"access_type_ref","table_size":0,"table":"tokens","cost":2.5e-07,"rows_read":1,"index":"index_tokens_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"tokens","access_type":"ref","possible_keys":["index_tokens_on_user_id"],"key":"index_tokens_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `taskbars` WHERE (user_id = 437)","table":"taskbars","md5":"c1adc133ab78d77411cdd36fd81d5113","messages":[{"tag":"access_type_ref","table_size":3,"table":"taskbars","cost":7.5e-07,"rows_read":3,"index":"index_taskbars_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"taskbars","access_type":"ref","possible_keys":["index_taskbars_on_user_id"],"key":"index_taskbars_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"7K"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM (SELECT 1 AS one FROM `groups_users` WHERE (user_id = 437)) subquery_for_count","table":"(select","md5":"0fefabe22fe65bbc23d773ab2313fe54","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_user_id","index_used":["user_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id"],"key":"index_groups_users_on_user_id","used_key_parts":["user_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `stores` WHERE (created_by_id = 437)","table":"stores","md5":"9b047b3805b2289351c0a6a0bc783a29","messages":[{"tag":"access_type_ref","table_size":2,"table":"stores","cost":5.0e-07,"rows_read":2,"index":"fk_rails_17354e2aa6","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"stores","access_type":"ref","possible_keys":["fk_rails_17354e2aa6"],"key":"fk_rails_17354e2aa6","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"8K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `packages` WHERE (created_by_id = 437)","table":"packages","md5":"63280f1627595899193f518fb5561d65","messages":[{"tag":"access_type_ref","table_size":0,"table":"packages","cost":2.5e-07,"rows_read":1,"index":"fk_rails_438d68f470","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"packages","access_type":"ref","possible_keys":["fk_rails_438d68f470"],"key":"fk_rails_438d68f470","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `packages` WHERE (updated_by_id = 437)","table":"packages","md5":"3cd16cd9b76c578ac12e3795f1bdea3b","messages":[{"tag":"access_type_ref","table_size":0,"table":"packages","cost":2.5e-07,"rows_read":1,"index":"fk_rails_86b7b71dbf","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"packages","access_type":"ref","possible_keys":["fk_rails_86b7b71dbf"],"key":"fk_rails_86b7b71dbf","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"1K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (created_by_id = 437)","table":"tickets","md5":"7a659cc0bccfc69170884c0c4f2d8bd7","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_created_by_id"],"key":"index_tickets_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"2K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (updated_by_id = 437)","table":"tickets","md5":"09c5f9be7f4fba94bc27aa63fa1a0a5e","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"fk_rails_edf0f77848","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["fk_rails_edf0f77848"],"key":"fk_rails_edf0f77848","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"2K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `users` WHERE (created_by_id = 437)","table":"users","md5":"e247f987b6c04b467c4bd51b171e69d5","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":0.012499999999999999,"rows_read":50000,"index":"index_users_on_created_by_id","index_used":["created_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":0.012499999999999999,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["index_users_on_created_by_id"],"key":"index_users_on_created_by_id","used_key_parts":["created_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["created_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `users` WHERE (updated_by_id = 437)","table":"users","md5":"b3a92e1c07873ac20b25e1be6fae09be","messages":[{"tag":"access_type_ref","table_size":100000,"table":"users","cost":5.0e-07,"rows_read":2,"index":"fk_rails_355a7ffe95","index_used":["updated_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":5.0e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"users","access_type":"ref","possible_keys":["fk_rails_355a7ffe95"],"key":"fk_rails_355a7ffe95","used_key_parts":["updated_by_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"46K"},"used_columns":["updated_by_id"]}}},"backtrace":["lib/models.rb:144:in `block (2 levels) in references'","lib/models.rb:141:in `each'","lib/models.rb:141:in `block in references'","lib/models.rb:134:in `each'","lib/models.rb:134:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `ticket_articles` WHERE (origin_by_id = 437)","table":"ticket_articles","md5":"274864f4886e092eb5bb60461e613696","messages":[{"tag":"access_type_ref","table_size":3,"table":"ticket_articles","cost":2.5e-07,"rows_read":1,"index":"fk_rails_c2dbb9e7aa","index_used":["origin_by_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.35"},"table":{"table_name":"ticket_articles","access_type":"ref","possible_keys":["fk_rails_c2dbb9e7aa"],"key":"fk_rails_c2dbb9e7aa","used_key_parts":["origin_by_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"63K"},"used_columns":["origin_by_id"]}}},"backtrace":["lib/models.rb:167:in `block (2 levels) in references'","lib/models.rb:159:in `each_value'","lib/models.rb:159:in `block in references'","lib/models.rb:156:in `each'","lib/models.rb:156:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (owner_id = 437)","table":"tickets","md5":"ed7b90f96d361a9006103c9696b90c7d","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":7.5e-07,"rows_read":3,"index":"index_tickets_on_owner_id","index_used":["owner_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":7.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.10"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_owner_id"],"key":"index_tickets_on_owner_id","used_key_parts":["owner_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"1.00","eval_cost":"0.10","prefix_cost":"1.10","data_read_per_join":"2K"},"used_columns":["owner_id"]}}},"backtrace":["lib/models.rb:167:in `block (2 levels) in references'","lib/models.rb:159:in `each_value'","lib/models.rb:159:in `block in references'","lib/models.rb:156:in `each'","lib/models.rb:156:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT COUNT(*) FROM `tickets` WHERE (customer_id = 437)","table":"tickets","md5":"0b6ce5fd20ca588b43c2bc6df84f8be7","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":2.5e-07,"rows_read":1,"index":"index_tickets_on_customer_id","index_used":["customer_id"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.09"},"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_customer_id"],"key":"index_tickets_on_customer_id","used_key_parts":["customer_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.99","eval_cost":"0.10","prefix_cost":"1.09","data_read_per_join":"2K"},"used_columns":["customer_id"]}}},"backtrace":["lib/models.rb:167:in `block (2 levels) in references'","lib/models.rb:159:in `each_value'","lib/models.rb:159:in `block in references'","lib/models.rb:156:in `each'","lib/models.rb:156:in `references'","app/controllers/application_controller/renders_models.rb:157:in `model_references_check'","app/controllers/users_controller.rb:317:in `destroy'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"]},{"sql":"SELECT `roles`.`id` FROM `roles` INNER JOIN `permissions_roles` ON `permissions_roles`.`role_id` = `roles`.`id` INNER JOIN `permissions` ON `permissions`.`id` = `permissions_roles`.`permission_id` WHERE `permissions`.`name` IN ('admin', 'admin.user') AND `permissions`.`active` = 1 AND `roles`.`active` = 1","table":"roles","md5":"e4e81efc74cd51e05eb4e98df526530a","messages":[{"tag":"access_type_range","table_size":52,"table":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_on_name","index_used":["name"]},{"tag":"join_type_ref","table_size":1000,"table":"permissions_roles","join_to":"permissions","cost":2.5e-07,"rows_read":1,"index":"index_permissions_roles_on_permission_id","index_used":["permission_id"]},{"tag":"join_type_eq_ref","table_size":3,"table":"roles","join_to":"permissions_roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":4,"cost":1.5625e-06}],"cost":2.3125000000000003e-06,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.56"},"nested_loop":[{"table":{"table_name":"permissions","access_type":"range","possible_keys":["PRIMARY","index_permissions_on_name"],"key":"index_permissions_on_name","used_key_parts":["name"],"key_length":"767","rows_examined_per_scan":2,"rows_produced_per_join":0,"filtered":"10.00","index_condition":"(`zammad_development`.`permissions`.`name` in ('admin','admin.user'))","cost_info":{"read_cost":"1.39","eval_cost":"0.02","prefix_cost":"1.41","data_read_per_join":"6K"},"used_columns":["id","name","active"],"attached_condition":"(`zammad_development`.`permissions`.`active` = 1)"}},{"table":{"table_name":"permissions_roles","access_type":"ref","possible_keys":["index_permissions_roles_on_role_id","index_permissions_roles_on_permission_id"],"key":"index_permissions_roles_on_permission_id","used_key_parts":["permission_id"],"key_length":"5","ref":["zammad_development.permissions.id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"100.00","cost_info":{"read_cost":"0.05","eval_cost":"0.02","prefix_cost":"1.49","data_read_per_join":"3"},"used_columns":["role_id","permission_id"],"attached_condition":"(`zammad_development`.`permissions_roles`.`role_id` is not null)"}},{"table":{"table_name":"roles","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.permissions_roles.role_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"33.33","cost_info":{"read_cost":"0.05","eval_cost":"0.01","prefix_cost":"1.56","data_read_per_join":"79"},"used_columns":["id","active"],"attached_condition":"(`zammad_development`.`roles`.`active` = 1)"}}]}},"backtrace":["app/models/user.rb:1110:in `last_admin_check_admin_count'","app/models/user.rb:1104:in `last_admin_check_by_role'","gems/activerecord-5.1.6.1/lib/active_record/associations/builder/collection_association.rb:39:in `block (2 levels) in define_callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:464:in `block in callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `each'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:463:in `callback'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:392:in `block in remove_records'","gems/activerecord-5.1.6.1/lib/active_record/associations/collection_association.rb:392:in `each'"]},{"sql":"SELECT DISTINCT(tickets.id), `tickets`.`updated_at` FROM `tickets` WHERE (group_id IN (1)) ORDER BY `tickets`.`updated_at` desc LIMIT 100 OFFSET 0","table":"tickets","md5":"e55aa500b9e03476d916560e24148d68","messages":[{"tag":"access_type_ref","table_size":1000000,"table":"tickets","cost":0.049999999999999996,"rows_read":200000,"index":"index_tickets_on_group_id","index_used":["group_id"]},{"tag":"retsize","result_size":100,"result_bytes":1200,"cost":0.00046875000000000004}],"cost":0.05046874999999999,"severity":"low","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"56924.78"},"ordering_operation":{"using_filesort":true,"duplicates_removal":{"using_filesort":false,"table":{"table_name":"tickets","access_type":"ref","possible_keys":["index_tickets_on_group_id","index_tickets_on_group_id_and_state_id","index_tickets_on_group_id_and_state_id_and_owner_id"],"key":"index_tickets_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":389532,"rows_produced_per_join":389532,"filtered":"100.00","index_condition":"(`zammad_development`.`tickets`.`group_id` <=> 1)","cost_info":{"read_cost":"17971.58","eval_cost":"38953.20","prefix_cost":"56924.78","data_read_per_join":"802M"},"used_columns":["id","group_id","updated_at"]}}}}},"backtrace":["app/models/ticket/search.rb:217:in `search'","app/controllers/users_controller.rb:391:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` INNER JOIN `roles_users` ON `roles_users`.`user_id` = `users`.`id` INNER JOIN `roles` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles`.`id` = 2 AND ((users.firstname LIKE '%CustomerFirst test802276083%' OR users.lastname LIKE '%CustomerFirst test802276083%' OR users.email LIKE '%CustomerFirst test802276083%' OR users.login LIKE '%CustomerFirst test802276083%') AND users.id != 1) ORDER BY `users`.`updated_at` desc LIMIT 100 OFFSET 0","table":"users","md5":"89f69a1412145cf2da584eff42ec0431","messages":[{"tag":"access_type_const","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"access_type_ref","table_size":1000,"table":"roles_users","cost":2.5e-07,"rows_read":1,"index":"index_roles_users_on_role_id","index_used":["role_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"roles_users","cost":5.0e-07,"rows_read":2,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":2,"result_bytes":2002,"cost":0.0007820312500000001}],"cost":0.0007830312500000001,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.38"},"ordering_operation":{"using_temporary_table":true,"using_filesort":true,"cost_info":{"sort_cost":"0.68"},"nested_loop":[{"table":{"table_name":"roles","access_type":"const","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","using_index":true,"cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id"]}},{"table":{"table_name":"roles_users","access_type":"ref","possible_keys":["index_roles_users_on_user_id","index_roles_users_on_role_id"],"key":"index_roles_users_on_role_id","used_key_parts":["role_id"],"key_length":"5","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"16"},"used_columns":["user_id","role_id"],"attached_condition":"((`zammad_development`.`roles_users`.`user_id` <> 1) and (`zammad_development`.`roles_users`.`user_id` is not null))"}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.roles_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":0,"filtered":"68.36","cost_info":{"read_cost":"0.25","eval_cost":"0.07","prefix_cost":"0.70","data_read_per_join":"31K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"((`zammad_development`.`users`.`firstname` like '%CustomerFirst test802276083%') or (`zammad_development`.`users`.`lastname` like '%CustomerFirst test802276083%') or (`zammad_development`.`users`.`email` like '%CustomerFirst test802276083%') or (`zammad_development`.`users`.`login` like '%CustomerFirst test802276083%'))"}}]}}},"backtrace":["app/controllers/users_controller.rb:439:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` = 520 ORDER BY `users`.`id` ASC LIMIT 500 OFFSET 0","table":"users","md5":"fb6c453f4577c6aeeb29491ed2b17381","messages":[{"tag":"access_type_const","table":"users"}],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"no matching row in const table"}},"backtrace":["app/controllers/users_controller.rb:61:in `index'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE (`users`.`id` != 1) LIMIT 23 OFFSET 1","table":"users","md5":"99506e4616faa6d6c5a4bc7c6f44b7a7","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.31"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":4,"filtered":"100.00","cost_info":{"read_cost":"0.91","eval_cost":"0.40","prefix_cost":"1.31","data_read_per_join":"185K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`id` <> 1)"}}},"backtrace":["app/models/concerns/can_csv_import.rb:330:in `csv_example'","app/controllers/users_controller.rb:1025:in `import_example'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE (`users`.`id` NOT IN (558, 559, 560, 561, 562, 1)) LIMIT 15","table":"users","md5":"639e34948d20ddcb066cd0929a830118","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"3.57"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":9,"rows_produced_per_join":9,"filtered":"100.00","cost_info":{"read_cost":"2.67","eval_cost":"0.90","prefix_cost":"3.57","data_read_per_join":"418K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`id` not in (558,559,560,561,562,1))"}}},"backtrace":["app/models/concerns/can_csv_import.rb:334:in `concat'","app/models/concerns/can_csv_import.rb:334:in `csv_example'","app/controllers/users_controller.rb:1025:in `import_example'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`created_at` asc LIMIT 100 OFFSET 0","table":"users","md5":"a0449d26c6b5a33e928ef0cf61ea656d","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`firstname` asc LIMIT 100 OFFSET 0","table":"users","md5":"a1e92223fef3ffc75781076943441b2e","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`firstname` desc LIMIT 100 OFFSET 0","table":"users","md5":"28d53eec9e8020c9f155d2dcfb073446","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`firstname` desc, `users`.`created_at` asc LIMIT 100 OFFSET 0","table":"users","md5":"7d5b6fd25f9ed8518e2d9568bd0fc5a9","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` FORCE INDEX(`PRIMARY`) WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`out_of_office` asc LIMIT 100 OFFSET 0","table":"users","md5":"907155a06248f6298bd430392868c5ad","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` FORCE INDEX(`PRIMARY`) WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`out_of_office` desc LIMIT 100 OFFSET 0","table":"users","md5":"e7819d7ce598d1e131007dda704a7231","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `users`.* FROM `users` WHERE ((firstname LIKE '%user_search_sortable 266718785%' OR lastname LIKE '%user_search_sortable 266718785%' OR email LIKE '%user_search_sortable 266718785%' OR login LIKE '%user_search_sortable 266718785%') AND id != 1) ORDER BY `users`.`created_by_id` asc, `users`.`created_at` asc LIMIT 100 OFFSET 0","table":"users","md5":"a03d18002723e0350db1a2f8a76e7b33","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"4.05"},"ordering_operation":{"using_filesort":true,"cost_info":{"sort_cost":"2.73"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":4,"rows_produced_per_join":2,"filtered":"68.36","cost_info":{"read_cost":"1.04","eval_cost":"0.27","prefix_cost":"1.31","data_read_per_join":"127K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(((`zammad_development`.`users`.`firstname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`lastname` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`email` like '%user_search_sortable 266718785%') or (`zammad_development`.`users`.`login` like '%user_search_sortable 266718785%')) and (`zammad_development`.`users`.`id` <> 1))"}}}},"backtrace":["app/controllers/users_controller.rb:474:in `search'","gems/actionpack-5.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/base.rb:186:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rendering.rb:30:in `process_action'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:131:in `run_callbacks'","gems/actionpack-5.1.6.1/lib/abstract_controller/callbacks.rb:19:in `process_action'","gems/actionpack-5.1.6.1/lib/action_controller/metal/rescue.rb:20:in `process_action'"]},{"sql":"SELECT `roles`.* FROM `roles` WHERE `roles`.`name` IN ('Agent', 'Admin')","table":"roles","md5":"8a798b952414cfc1a03a84bd298d3d5d","messages":[{"tag":"access_type_range","table_size":3,"table":"roles","cost":2.5e-07,"rows_read":1,"index":"index_roles_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":136,"cost":5.3125000000000004e-05}],"cost":5.3375e-05,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.41"},"table":{"table_name":"roles","access_type":"range","possible_keys":["index_roles_on_name"],"key":"index_roles_on_name","used_key_parts":["name"],"key_length":"302","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","index_condition":"(`zammad_development`.`roles`.`name` in ('Agent','Admin'))","cost_info":{"read_cost":"1.21","eval_cost":"0.20","prefix_cost":"1.41","data_read_per_join":"2K"},"used_columns":["id","name","preferences","default_at_signup","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:159:in `create_or_update'","app/models/application_model/can_creates_and_updates.rb:86:in `create_or_update_with_ref'","lib/auto_wizard.rb:118:in `block in setup'","lib/auto_wizard.rb:106:in `each'","lib/auto_wizard.rb:106:in `setup'","lib/tasks/zammad/setup/auto_wizard.rake:13:in `block (3 levels) in <top (required)>'","gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'","gems/rake-12.3.1/lib/rake/task.rb:271:in `each'"]},{"sql":"SELECT `users`.* FROM `users` WHERE `users`.`id` IN (583, 584)","table":"users","md5":"747c3b05e7ab0622aac6427fa26265df","messages":[{"tag":"access_type_range","table_size":100000,"table":"users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.000391265625,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.91"},"table":{"table_name":"users","access_type":"range","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","rows_examined_per_scan":2,"rows_produced_per_join":2,"filtered":"100.00","cost_info":{"read_cost":"0.71","eval_cost":"0.20","prefix_cost":"0.91","data_read_per_join":"92K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"],"attached_condition":"(`zammad_development`.`users`.`id` in (583,584))"}}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:142:in `create_or_update'","app/models/application_model/can_creates_and_updates.rb:86:in `create_or_update_with_ref'","lib/auto_wizard.rb:144:in `block (2 levels) in setup'","lib/auto_wizard.rb:142:in `each'","lib/auto_wizard.rb:142:in `block in setup'","lib/auto_wizard.rb:139:in `each'","lib/auto_wizard.rb:139:in `setup'","lib/tasks/zammad/setup/auto_wizard.rake:13:in `block (3 levels) in <top (required)>'"]},{"sql":"SELECT 1 AS one FROM `groups_users` WHERE `groups_users`.`user_id` = 583 AND `groups_users`.`group_id` IS NULL AND (`groups_users`.`access` != 'full') LIMIT 1","table":"groups_users","md5":"eeef1e905f158f412ace995d0443631a","messages":[],"cost":0,"severity":"none","raw_explain":{"query_block":{"select_id":1,"message":"Impossible WHERE"}},"backtrace":["app/models/concerns/has_group_relation_definition.rb:49:in `validate_access'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:413:in `block in make_lambda'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `catch'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:600:in `block in default_terminator'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:198:in `block in halting'","gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:507:in `block in invoke_before'"]},{"sql":"SELECT `signatures`.* FROM `signatures` WHERE `signatures`.`name` = 'default'","table":"signatures","md5":"20e591cb3a00f060ea1f1e501500200d","messages":[{"tag":"access_type_const","table_size":1,"table":"signatures","cost":2.5e-07,"rows_read":1,"index":"index_signatures_on_name","index_used":["name"]},{"tag":"retsize","result_size":1,"result_bytes":0,"cost":0.0}],"cost":2.5e-07,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"1.00"},"table":{"table_name":"signatures","access_type":"const","possible_keys":["index_signatures_on_name"],"key":"index_signatures_on_name","used_key_parts":["name"],"key_length":"302","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.00","eval_cost":"0.10","prefix_cost":"0.00","data_read_per_join":"1K"},"used_columns":["id","name","body","active","note","updated_by_id","created_by_id","created_at","updated_at"]}}},"backtrace":["app/models/application_model/can_lookup.rb:52:in `find_and_save_to_cache_by'","app/models/application_model/can_lookup.rb:29:in `lookup'","app/models/application_model/can_associations.rb:378:in `block in association_name_to_id_convert'","app/models/application_model/can_associations.rb:351:in `map'","app/models/application_model/can_associations.rb:351:in `association_name_to_id_convert'","app/models/application_model/can_creates_and_updates.rb:85:in `create_or_update_with_ref'","lib/auto_wizard.rb:144:in `block (2 levels) in setup'","lib/auto_wizard.rb:142:in `each'"]},{"sql":"SELECT `users`.* FROM `users` INNER JOIN `groups_users` ON `users`.`id` = `groups_users`.`user_id` WHERE `groups_users`.`group_id` = 1","table":"users","md5":"62b85246be6887d98d1228f34948e8b5","messages":[{"tag":"access_type_ref","table_size":1000,"table":"groups_users","cost":2.5e-07,"rows_read":1,"index":"index_groups_users_on_group_id","index_used":["group_id"]},{"tag":"join_type_eq_ref","table_size":100000,"table":"users","join_to":"groups_users","cost":2.5e-07,"rows_read":1,"index":"PRIMARY","index_used":["id"]},{"tag":"retsize","result_size":1,"result_bytes":1001,"cost":0.00039101562500000003}],"cost":0.00039151562500000005,"severity":"none","raw_explain":{"query_block":{"select_id":1,"cost_info":{"query_cost":"0.70"},"nested_loop":[{"table":{"table_name":"groups_users","access_type":"ref","possible_keys":["index_groups_users_on_user_id","index_groups_users_on_group_id"],"key":"index_groups_users_on_group_id","used_key_parts":["group_id"],"key_length":"4","ref":["const"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.35","data_read_per_join":"160"},"used_columns":["user_id","group_id"]}},{"table":{"table_name":"users","access_type":"eq_ref","possible_keys":["PRIMARY"],"key":"PRIMARY","used_key_parts":["id"],"key_length":"4","ref":["zammad_development.groups_users.user_id"],"rows_examined_per_scan":1,"rows_produced_per_join":1,"filtered":"100.00","cost_info":{"read_cost":"0.25","eval_cost":"0.10","prefix_cost":"0.70","data_read_per_join":"46K"},"used_columns":["id","organization_id","login","firstname","lastname","email","image","image_source","web","password","phone","fax","mobile","department","street","zip","city","country","address","vip","verified","active","note","last_login","source","login_failed","out_of_office","out_of_office_start_at","out_of_office_end_at","out_of_office_replacement_id","preferences","updated_by_id","created_by_id","created_at","updated_at"]}}]}},"backtrace":["app/models/application_model/can_creates_and_updates.rb:138:in `block in create_or_update'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","gems/activerecord-5.1.6.1/lib/active_record/relation/delegation.rb:39:in `each'","app/models/application_model/can_creates_and_updates.rb:136:in `create_or_update'","app/models/application_model/can_creates_and_updates.rb:86:in `create_or_update_with_ref'","lib/auto_wizard.rb:144:in `block (2 levels) in setup'","lib/auto_wizard.rb:142:in `each'","lib/auto_wizard.rb:142:in `block in setup'"]}],"tags":{"fuzzed_data":{"title":"Fuzzed Data","summary":"Table sizes estimated as follows -- {{ fuzz_table_sizes }}","description":"We're not sure how much data this table will hold in the future, so we've pretended\nthere's 6000 rows in it. This can lead to a lot of false positives. To\nimprove results, please give shiba your index statistics.\n","level":"info"},"possible_key_check":{"title":"Oddly reported possible keys","description":"MySQL reported that it had keys it could have used, but elected not to use them.\nShiba checked each of the possible keys and returned the results from the best\nkey possible. Sometimes \"possible_keys\" will be inaccurate and no keys were possible.\n"},"access_type_const":{"title":"One row","summary":"The database only needs to read a single row from <b>{{table}}</b>.","description":"This query selects at *most* one row, which is about as good as things get.\n"},"access_type_ref":{"title":"Index Scan","summary":"The database reads {{ formatted_cost }} rows in <b>{{ table }}</b> via the <i>{{ index }}</i> index ({{ key_parts }}).","description":"This query uses an index to find rows that match a single value. Often this\nhas very good performance, but it depends on how many rows match that value.\n"},"join_type_eq_ref":{"title":"Indexed Join","summary":"<b>{{ table }}</b> is joined to <b>{{ join_to }}</b> via <i>{{ index }}</i>, reading 1 row per joined item."},"join_type_ref":{"title":"Indexed Join","summary":"<b>{{ table }}</b> is joined to <b>{{ join_to }}</b> via <i>{{ index }}</i>, reading {{ formatted_cost }} rows per joined item."},"access_type_range":{"title":"Indexed","summary":"The database uses a \"range scan\" to read more than {{ formatted_cost }} rows in {{ table }} via the <b>{{ index }}</b> index ({{ key_parts }})","description":"This query uses an index to find rows that match a range of values, for instance\n`WHERE indexed_value in (1,2,5,6)` or `WHERE indexed_value >= 5 AND indexed_value <= 15`.\nIt's very hard to estimate how many rows this query will consider in production, so we've\nupped the formatted_cost of this query.\n"},"access_type_index":{"title":"Index Scan","summary":"The database reads {{ formatted_cost }} of the rows in <b>{{ table }}</b> via <i>{{ index }}</i>"},"access_type_tablescan":{"title":"Table Scan","summary":"The database reads {{ formatted_cost }} of the rows in <b>{{ table }}</b>, skipping any indexes.","description":"This query doesn't use any indexes to find data, meaning this query will need to evaluate\nevery single row in the table. This is about the worst of all possible worlds.\n\nThis *can* be fine if, say, you're querying a tiny table (less than ~500 rows),\nbut be aware that if this table is not effectively tiny or constant-sized you're entering\na world of pain.\n"},"limited_scan":{"title":"Limited Scan","summary":"The database reads {{ formatted_cost }} rows from {{ table }}.","description":"This query doesn't use any indexes to find data, but since it doesn't care about\nordering and it doesn't have any conditions, it only ever reads {{ formatted_cost }} rows.\n"},"ignored":{"title":"Ignored","summary":"This query matched an \"ignore\" rule in shiba.yml. Any further analysis was skipped.","description":null,"level":"info"},"index_walk":{"title":"Index Walk","description":"This query is sorted in the same order as the index used, which means that the database\ncan read the index and simply pluck {LIMIT} rows out of the index. It's a very\nfast way to look up stuff by index.\n","level":"success"},"retsize":{"title":"Results","summary":"The database returns {{ formatted_result }} to the client."}},"url":"https://github.com/burrito-brothers/zammad/blob/integrate_shiba"}
|
@@ -0,0 +1 @@
|
|
1
|
+
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Shiba Results</title><link href=/js/app.4765e0d6.js rel=preload as=script></head><body><div id=app></div><script src=/js/app.4765e0d6.js></script></body></html>
|
File without changes
|
File without changes
|
data/lib/shiba/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
7
|
+
<title>Shiba Results</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="app"></div>
|
11
|
+
<!-- built files will be auto injected -->
|
12
|
+
</body>
|
13
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
@@ -91,12 +91,13 @@ executables:
|
|
91
91
|
extensions: []
|
92
92
|
extra_rdoc_files: []
|
93
93
|
files:
|
94
|
-
- "./web/dist/index.html"
|
95
|
-
- "./web/dist/js/app.4765e0d6.js"
|
96
|
-
- "./web/dist/js/app.4765e0d6.js.map"
|
97
94
|
- ".gitignore"
|
98
95
|
- ".travis.yml"
|
99
96
|
- ".travis/my.cnf"
|
97
|
+
- "/Users/ben/src/shiba/web/dist/example_data.json.no"
|
98
|
+
- "/Users/ben/src/shiba/web/dist/index.html"
|
99
|
+
- "/Users/ben/src/shiba/web/dist/js/app.4765e0d6.js"
|
100
|
+
- "/Users/ben/src/shiba/web/dist/js/app.4765e0d6.js.map"
|
100
101
|
- CODE_OF_CONDUCT.md
|
101
102
|
- Gemfile
|
102
103
|
- Gemfile.lock
|
@@ -160,6 +161,7 @@ files:
|
|
160
161
|
- web/babel.config.js
|
161
162
|
- web/package-lock.json
|
162
163
|
- web/package.json
|
164
|
+
- web/public/index.html
|
163
165
|
- web/src/App.vue
|
164
166
|
- web/src/assets/logo.png
|
165
167
|
- web/src/components/Backtrace.vue
|
@@ -190,7 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
192
|
- !ruby/object:Gem::Version
|
191
193
|
version: '0'
|
192
194
|
requirements: []
|
193
|
-
|
195
|
+
rubyforge_project:
|
196
|
+
rubygems_version: 2.7.6
|
194
197
|
signing_key:
|
195
198
|
specification_version: 4
|
196
199
|
summary: A gem that attempts to find bad queries before you shoot self in foot
|
data/web/dist/index.html
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Vue App</title><link href=/js/app.4765e0d6.js rel=preload as=script></head><body><div id=app></div><script src=/js/app.4765e0d6.js></script></body></html>
|