|
code
app/jobs/create_automatic_diagnosis_job.rb:2
|
81%
|
app/jobs/create_automatic_diagnosis_job.rb:2
- Average Self
-
2,091ms
- Average calls
- 1x
- Total Self
- 2,091ms
- Total Children
- 455ms
- Total runtime
- 2,546ms
CreateAutomaticDiagnosisJob#perform
|
|
sql
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:50
|
4%
|
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:50
- Average Self
-
105ms
- Average calls
- 0.97x
- Total Self
- 102ms
- Total Children
- 0ms
- Total runtime
- 102ms
SELECT "facilities".* FROM "facilities" WHERE "facilities"."siret" = ? LIMIT ?
|
|
sql
app/models/expert.rb:256
|
3%
|
app/models/expert.rb:256
- Average Self
-
83ms
- Average calls
- 0.92x
- Total Self
- 77ms
- Total Children
- 0ms
- Total runtime
- 77ms
SELECT "experts"."id" FROM "experts" LEFT OUTER JOIN "antennes" ON "antennes"."id" = "experts"."antenne_id" LEFT OUTER JOIN "territorial_zones" ON "territorial_zones"."zoneable_type" = ? AND "territorial_zones"."zoneable_id" = "antennes"."id" WHERE "experts"."id" NOT IN (?) AND ("territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ? OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" IS NULL OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ? OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ? OR "antennes"."territorial_level" = ?)
|
|
sql
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:53
|
2%
|
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:53
- Average Self
-
24ms
- Average calls
- 1.9x
- Total Self
- 46ms
- Total Children
- 0ms
- Total runtime
- 46ms
SELECT ? AS one FROM "facilities" WHERE "facilities"."siret" = ? AND "facilities"."id" != ? LIMIT ?
UPDATE "facilities" SET "updated_at" = ?, "naf_code" = ?, "code_effectif" = ?, "naf_libelle" = ?, "naf_code_a10" = ?, "opco_id" = ?, "effectif" = ? WHERE "facilities"."id" = ?
|
|
gc
ruby/gc.c
|
2%
|
ruby/gc.c
- Average Self
-
42ms
- Average calls
- 1x
- Total Self
- 43ms
- Total Children
- 0ms
- Total runtime
- 43ms
GC.start
|
|
sql
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:22
|
2%
|
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:22
- Average Self
-
42ms
- Average calls
- 0.98x
- Total Self
- 41ms
- Total Children
- 0ms
- Total runtime
- 41ms
SELECT "companies".* FROM "companies" WHERE "companies"."siren" = ? LIMIT ?
|
|
sql
app/models/expert.rb:247
|
<1%
|
app/models/expert.rb:247
- Average Self
-
25ms
- Average calls
- 0.92x
- Total Self
- 23ms
- Total Children
- 0ms
- Total runtime
- 23ms
SELECT "experts"."id" FROM "experts" INNER JOIN "territorial_zones" ON "territorial_zones"."zoneable_type" = ? AND "territorial_zones"."zoneable_id" = "experts"."id" WHERE "experts"."deleted_at" IS NULL
|
|
sql
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:25
|
<1%
|
app/services/diagnosis_creation/create_or_update_facility_and_company.rb:25
- Average Self
-
9ms
- Average calls
- 1.8x
- Total Self
- 16ms
- Total Children
- 0ms
- Total runtime
- 16ms
SELECT ? AS one FROM "companies" WHERE "companies"."siren" = ? AND "companies"."id" != ? LIMIT ?
UPDATE "companies" SET "updated_at" = ?, "code_effectif" = ?, "forme_exercice" = ? WHERE "companies"."id" = ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:36
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:36
- Average Self
-
17ms
- Average calls
- 0.92x
- Total Self
- 15ms
- Total Children
- 0ms
- Total runtime
- 15ms
SELECT "experts_subjects".* FROM "experts_subjects" INNER JOIN "experts" ON "experts"."deleted_at" IS NULL AND "experts"."id" = "experts_subjects"."expert_id" INNER JOIN "institutions_subjects" ON "institutions_subjects"."id" = "experts_subjects"."institution_subject_id" INNER JOIN "institutions" ON "institutions"."id" = "institutions_subjects"."institution_id" WHERE "experts_subjects"."expert_id" IN (?) OR "experts"."id" IN (?))) AND "institutions_subjects"."subject_id" = ? AND "institutions_subjects"."institution_id" IN (?) AND "institutions_subjects"."institution_id" != ? AND "institutions_subjects"."institution_id" != ? AND "institutions_subjects"."institution_id" != ? AND "institutions_subjects"."institution_id" NOT IN (?)
|
|
sql
app/services/diagnosis_creation/create_matches.rb:16
|
<1%
|
app/services/diagnosis_creation/create_matches.rb:16
- Average Self
-
2.2ms
- Average calls
- 5.5x
- Total Self
- 12ms
- Total Children
- 0ms
- Total runtime
- 12ms
SELECT ? AS one FROM "matches" WHERE "matches"."expert_id" = ? AND "matches"."need_id" = ? LIMIT ?
INSERT INTO "matches" ("need_id", "created_at", "updated_at", "taken_care_of_at", "closed_at", "expert_id", "subject_id", "status", "archived_at", "sent_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"
UPDATE "needs" SET "matches_count" = COALESCE("needs"."matches_count", ?) + ?, "updated_at" = ? WHERE "needs"."id" = ?
|
|
sql
app/jobs/create_automatic_diagnosis_job.rb:3
|
<1%
|
app/jobs/create_automatic_diagnosis_job.rb:3
- Average Self
-
10ms
- Average calls
- 1x
- Total Self
- 10ms
- Total Children
- 0ms
- Total runtime
- 10ms
SELECT "solicitations".* FROM "solicitations" WHERE "solicitations"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/create_automatic_diagnosis.rb:15
|
<1%
|
app/services/diagnosis_creation/create_automatic_diagnosis.rb:15
- Average Self
-
5.5ms
- Average calls
- 1.9x
- Total Self
- 10ms
- Total Children
- 0ms
- Total runtime
- 10ms
UPDATE "solicitations" SET "updated_at" = ? WHERE "solicitations"."id" = ?
COMMIT
|
|
sql
app/models/expert_subject.rb:99
|
<1%
|
app/models/expert_subject.rb:99
- Average Self
-
1.3ms
- Average calls
- 7.8x
- Total Self
- 10ms
- Total Children
- 0ms
- Total runtime
- 10ms
SELECT "match_filters".* FROM "match_filters" INNER JOIN "experts" ON "match_filters"."filtrable_element_id" = "experts"."id" WHERE "experts"."id" = ? AND "match_filters"."filtrable_element_type" = ?
SELECT "match_filters".* FROM "match_filters" INNER JOIN "antennes" ON "match_filters"."filtrable_element_id" = "antennes"."id" INNER JOIN "experts" ON "antennes"."id" = "experts"."antenne_id" WHERE "experts"."id" = ? AND "match_filters"."filtrable_element_type" = ?
SELECT "match_filters".* FROM "match_filters" INNER JOIN "institutions" ON "match_filters"."filtrable_element_id" = "institutions"."id" INNER JOIN "antennes" ON "institutions"."id" = "antennes"."institution_id" INNER JOIN "experts" ON "antennes"."id" = "experts"."antenne_id" WHERE "experts"."id" = ? AND "match_filters"."filtrable_element_type" = ?
|
|
sql
app/services/diagnosis_creation/create_automatic_diagnosis.rb:36
|
<1%
|
app/services/diagnosis_creation/create_automatic_diagnosis.rb:36
- Average Self
-
3.4ms
- Average calls
- 3x
- Total Self
- 10ms
- Total Children
- 0ms
- Total runtime
- 10ms
BEGIN
SELECT ? AS one FROM "facilities" WHERE "facilities"."siret" = ? AND "facilities"."id" != ? LIMIT ?
ROLLBACK
|
|
sql
app/services/diagnosis_creation/steps.rb:25
|
<1%
|
app/services/diagnosis_creation/steps.rb:25
- Average Self
-
5.1ms
- Average calls
- 1.9x
- Total Self
- 9.5ms
- Total Children
- 0ms
- Total runtime
- 9.5ms
INSERT INTO "contacts" ("email", "phone_number", "company_id", "created_at", "updated_at", "full_name") VALUES (?, ?, ?, ?, ?, ?) RETURNING "id"
UPDATE "diagnoses" SET "updated_at" = ?, "visitee_id" = ? WHERE "diagnoses"."id" = ?
|
|
sql
app/models/expert.rb:244
|
<1%
|
app/models/expert.rb:244
- Average Self
-
5.8ms
- Average calls
- 0.92x
- Total Self
- 5.4ms
- Total Children
- 0ms
- Total runtime
- 5.4ms
SELECT "experts"."id" FROM "experts" LEFT OUTER JOIN "territorial_zones" ON "territorial_zones"."zoneable_type" = ? AND "territorial_zones"."zoneable_id" = "experts"."id" WHERE ("territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ? OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" IS NULL OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ? OR "territorial_zones"."zone_type" = ? AND "territorial_zones"."code" = ?)
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:31
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:31
- Average Self
-
1.4ms
- Average calls
- 3.2x
- Total Self
- 4.4ms
- Total Children
- 0ms
- Total runtime
- 4.4ms
SELECT ? AS one FROM "subject_answer_groupings" INNER JOIN "subject_answers" ON "subject_answers"."subject_answer_grouping_id" = "subject_answer_groupings"."id" AND "subject_answers"."type" = ? INNER JOIN "subject_questions" "subject_question" ON "subject_question"."id" = "subject_answers"."subject_question_id" INNER JOIN "subjects" ON "subjects"."id" = "subject_question"."subject_id" WHERE "subject_answer_groupings"."institution_id" = ? AND "subject_question"."subject_id" = ? LIMIT ?
SELECT DISTINCT "subject_answer_groupings".* FROM "subject_answer_groupings" INNER JOIN "subject_answers" ON "subject_answers"."subject_answer_grouping_id" = "subject_answer_groupings"."id" AND "subject_answers"."type" = ? INNER JOIN "subject_questions" "subject_question" ON "subject_question"."id" = "subject_answers"."subject_question_id" INNER JOIN "subjects" ON "subjects"."id" = "subject_question"."subject_id" WHERE "subject_answer_groupings"."institution_id" = ? AND "subject_question"."subject_id" = ?
|
|
sql
app/models/diagnosis.rb:134
|
<1%
|
app/models/diagnosis.rb:134
- Average Self
-
0.56ms
- Average calls
- 6.6x
- Total Self
- 3.7ms
- Total Children
- 0ms
- Total runtime
- 3.7ms
SELECT "diagnoses".* FROM "diagnoses" INNER JOIN "solicitations" ON "solicitations"."id" = "diagnoses"."solicitation_id" WHERE "solicitations"."id" = ?
|
|
sql
app/models/solicitation.rb:601
|
<1%
|
app/models/solicitation.rb:601
- Average Self
-
1.6ms
- Average calls
- 2x
- Total Self
- 3.1ms
- Total Children
- 0ms
- Total runtime
- 3.1ms
SELECT "landing_subjects".* FROM "landing_subjects" WHERE "landing_subjects"."id" = ? LIMIT ?
SELECT "subjects".* FROM "subjects" WHERE "subjects"."id" = ? LIMIT ?
|
|
sql
app/models/concerns/mandatory_answers.rb:30
|
<1%
|
app/models/concerns/mandatory_answers.rb:30
- Average Self
-
0.63ms
- Average calls
- 4.9x
- Total Self
- 3.1ms
- Total Children
- 0.04ms
- Total runtime
- 3.1ms
SELECT "subject_questions"."id" FROM "subject_questions" WHERE "subject_questions"."subject_id" = ?
BEGIN
SELECT "subjects".* FROM "subjects" INNER JOIN "landing_subjects" ON "subjects"."id" = "landing_subjects"."subject_id" WHERE "landing_subjects"."id" = ? LIMIT ?
SELECT "subject_answers".* FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_questionable_id" = ? AND "subject_answers"."subject_questionable_type" = ? AND "subject_answers"."subject_question_id" NOT IN (?)
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:76
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:76
- Average Self
-
0.88ms
- Average calls
- 3.4x
- Total Self
- 3ms
- Total Children
- 0ms
- Total runtime
- 3ms
SELECT ? AS one FROM "subjects" INNER JOIN "match_filters_subjects" ON "subjects"."id" = "match_filters_subjects"."subject_id" WHERE "match_filters_subjects"."match_filter_id" = ? LIMIT ?
SELECT ? AS one FROM "subjects" INNER JOIN "match_filters_subjects" ON "subjects"."id" = "match_filters_subjects"."subject_id" WHERE "match_filters_subjects"."match_filter_id" = ? AND "subjects"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/create_or_update_diagnosis.rb:19
|
<1%
|
app/services/diagnosis_creation/create_or_update_diagnosis.rb:19
- Average Self
-
3.1ms
- Average calls
- 0.94x
- Total Self
- 2.9ms
- Total Children
- 0ms
- Total runtime
- 2.9ms
INSERT INTO "diagnoses" ("content", "created_at", "updated_at", "step", "advisor_id", "visitee_id", "facility_id", "happened_on", "solicitation_id", "completed_at", "retention_email_sent") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"
|
|
sql
app/services/diagnosis_creation/create_automatic_diagnosis.rb:21
|
<1%
|
app/services/diagnosis_creation/create_automatic_diagnosis.rb:21
- Average Self
-
1.4ms
- Average calls
- 2x
- Total Self
- 2.8ms
- Total Children
- 0.53ms
- Total runtime
- 3.3ms
BEGIN
SELECT "diagnoses".* FROM "diagnoses" WHERE "diagnoses"."solicitation_id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:30
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:30
- Average Self
-
0.51ms
- Average calls
- 5.2x
- Total Self
- 2.7ms
- Total Children
- 0ms
- Total runtime
- 2.7ms
SELECT "experts".* FROM "experts" WHERE "experts"."id" = ? LIMIT ?
SELECT "institutions".* FROM "institutions" INNER JOIN "antennes" ON "institutions"."id" = "antennes"."institution_id" WHERE "antennes"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/steps.rb:45
|
<1%
|
app/services/diagnosis_creation/steps.rb:45
- Average Self
-
0.82ms
- Average calls
- 2.9x
- Total Self
- 2.4ms
- Total Children
- 0ms
- Total runtime
- 2.4ms
SELECT "subject_questions".* FROM "subject_questions" WHERE "subject_questions"."id" = ? LIMIT ?
SELECT ? AS one FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_questionable_id" IS NULL AND "subject_answers"."subject_questionable_type" = ? AND "subject_answers"."subject_question_id" = ? LIMIT ?
SELECT ? AS one FROM "needs" WHERE "needs"."subject_id" = ? AND "needs"."diagnosis_id" = ? LIMIT ?
UPDATE "diagnoses" SET "updated_at" = ?, "step" = ? WHERE "diagnoses"."id" = ?
INSERT INTO "needs" ("diagnosis_id", "subject_id", "created_at", "updated_at", "content", "matches_count", "satisfaction_email_sent", "status", "abandoned_email_sent", "retention_sent_at", "starred_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"
INSERT INTO "subject_answers" ("subject_question_id", "subject_questionable_type", "subject_questionable_id", "filter_value", "created_at", "updated_at", "type", "subject_answer_grouping_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?) RETURNING "id"
|
|
redis
app/services/api.rb:14
|
<1%
|
app/services/api.rb:14
- Average Self
-
0.53ms
- Average calls
- 3.7x
- Total Self
- 2ms
- Total Children
- 0ms
- Total runtime
- 2ms
get
|
|
sql
app/services/diagnosis_creation/create_automatic_diagnosis.rb:31
|
<1%
|
app/services/diagnosis_creation/create_automatic_diagnosis.rb:31
- Average Self
-
2.8ms
- Average calls
- 0.68x
- Total Self
- 1.9ms
- Total Children
- 0ms
- Total runtime
- 1.9ms
SELECT "subject_answers".* FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_questionable_id" = ? AND "subject_answers"."subject_questionable_type" = ?
SELECT "matches".* FROM "matches" WHERE "matches"."need_id" = ?
DELETE FROM "matches" WHERE "matches"."id" = ?
SELECT "feedbacks".* FROM "feedbacks" WHERE "feedbacks"."feedbackable_id" = ? AND "feedbacks"."feedbackable_type" = ? AND "feedbacks"."category" = ?
DELETE FROM "feedbacks" WHERE "feedbacks"."id" = ?
SELECT "reminders_actions".* FROM "reminders_actions" WHERE "reminders_actions"."need_id" = ?
SELECT "company_satisfactions".* FROM "company_satisfactions" WHERE "company_satisfactions"."need_id" = ? LIMIT ?
DELETE FROM "needs" WHERE "needs"."id" = ?
DELETE FROM "diagnoses" WHERE "diagnoses"."id" = ?
|
|
sql
app/services/diagnosis_creation/steps.rb:40
|
<1%
|
app/services/diagnosis_creation/steps.rb:40
- Average Self
-
0.78ms
- Average calls
- 1.7x
- Total Self
- 1.3ms
- Total Children
- 0ms
- Total runtime
- 1.3ms
SELECT ? AS one FROM "needs" WHERE "needs"."subject_id" = ? AND "needs"."diagnosis_id" = ? LIMIT ?
|
|
sql
app/models/solicitation.rb:702
|
<1%
|
app/models/solicitation.rb:702
- Average Self
-
1.2ms
- Average calls
- 0.98x
- Total Self
- 1.2ms
- Total Children
- 0ms
- Total runtime
- 1.2ms
SELECT "spams".* FROM "spams" WHERE "spams"."email" = ? LIMIT ?
|
|
sql
app/models/need.rb:466
|
<1%
|
app/models/need.rb:466
- Average Self
-
0.6ms
- Average calls
- 1.8x
- Total Self
- 1.1ms
- Total Children
- 0ms
- Total runtime
- 1.1ms
UPDATE "diagnoses" SET "updated_at" = ? WHERE "diagnoses"."id" = ?
|
|
code
vendor/bundle/ruby/4.0.0/gems/sidekiq-8.1.6/lib/active_job/queue_adapters/sidekiq_adapter.rb:13
|
<1%
|
vendor/bundle/ruby/4.0.0/gems/sidekiq-8.1.6/lib/active_job/queue_adapters/sidekiq_adapter.rb:13
- Average Self
-
0.99ms
- Average calls
- 1x
- Total Self
- 0.99ms
- Total Children
- 2,547ms
- Total runtime
- 2,548ms
CreateAutomaticDiagnosisJob#perform
|
|
cache
app/services/api.rb:14
|
<1%
|
app/services/api.rb:14
- Average Self
-
0.26ms
- Average calls
- 3.7x
- Total Self
- 0.96ms
- Total Children
- 2ms
- Total runtime
- 2.9ms
read
|
|
sql
app/services/diagnosis_creation/steps.rb:51
|
<1%
|
app/services/diagnosis_creation/steps.rb:51
- Average Self
-
0.91ms
- Average calls
- 0.95x
- Total Self
- 0.86ms
- Total Children
- 0ms
- Total runtime
- 0.86ms
SELECT "matches".* FROM "matches" INNER JOIN "needs" ON "matches"."need_id" = "needs"."id" WHERE "needs"."diagnosis_id" = ?
|
|
sql
app/models/need.rb:462
|
<1%
|
app/models/need.rb:462
- Average Self
-
0.44ms
- Average calls
- 1.8x
- Total Self
- 0.81ms
- Total Children
- 0ms
- Total runtime
- 0.81ms
SELECT "matches".* FROM "matches" WHERE "matches"."need_id" = ?
|
|
sql
app/services/diagnosis_creation/steps.rb:54
|
<1%
|
app/services/diagnosis_creation/steps.rb:54
- Average Self
-
0.87ms
- Average calls
- 0.92x
- Total Self
- 0.81ms
- Total Children
- 0ms
- Total runtime
- 0.81ms
UPDATE "diagnoses" SET "updated_at" = ?, "step" = ? WHERE "diagnoses"."id" = ?
|
|
sql
app/services/diagnosis_creation/steps.rb:42
|
<1%
|
app/services/diagnosis_creation/steps.rb:42
- Average Self
-
0.76ms
- Average calls
- 0.94x
- Total Self
- 0.71ms
- Total Children
- 0ms
- Total runtime
- 0.71ms
SELECT "subject_answers".* FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_questionable_id" = ? AND "subject_answers"."subject_questionable_type" = ?
|
|
sql
app/services/diagnosis_creation/create_matches.rb:15
|
<1%
|
app/services/diagnosis_creation/create_matches.rb:15
- Average Self
-
0.37ms
- Average calls
- 1.8x
- Total Self
- 0.68ms
- Total Children
- 0ms
- Total runtime
- 0.68ms
SELECT "subjects".* FROM "subjects" INNER JOIN "institutions_subjects" ON "subjects"."id" = "institutions_subjects"."subject_id" WHERE "institutions_subjects"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:161
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:161
- Average Self
-
0.6ms
- Average calls
- 0.76x
- Total Self
- 0.46ms
- Total Children
- 0ms
- Total runtime
- 0.46ms
SELECT "companies".* FROM "companies" INNER JOIN "facilities" ON "companies"."id" = "facilities"."company_id" INNER JOIN "diagnoses" ON "facilities"."id" = "diagnoses"."facility_id" WHERE "diagnoses"."id" = ? LIMIT ?
|
|
sql
app/models/facility.rb:84
|
<1%
|
app/models/facility.rb:84
- Average Self
-
0.48ms
- Average calls
- 0.92x
- Total Self
- 0.45ms
- Total Children
- 0ms
- Total runtime
- 0.45ms
SELECT "companies".* FROM "companies" WHERE "companies"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:157
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:157
- Average Self
-
0.46ms
- Average calls
- 0.92x
- Total Self
- 0.42ms
- Total Children
- 0ms
- Total runtime
- 0.42ms
SELECT "facilities".* FROM "facilities" INNER JOIN "diagnoses" ON "facilities"."id" = "diagnoses"."facility_id" WHERE "diagnoses"."id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:62
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:62
- Average Self
-
0.53ms
- Average calls
- 0.77x
- Total Self
- 0.4ms
- Total Children
- 0ms
- Total runtime
- 0.4ms
SELECT "subject_answers".* FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_answer_grouping_id" = ?
|
|
sql
app/services/diagnosis_creation/steps.rb:13
|
<1%
|
app/services/diagnosis_creation/steps.rb:13
- Average Self
-
0.36ms
- Average calls
- 0.94x
- Total Self
- 0.34ms
- Total Children
- 0ms
- Total runtime
- 0.34ms
UPDATE "diagnoses" SET "updated_at" = ?, "happened_on" = ? WHERE "diagnoses"."id" = ?
|
|
sql
app/models/subject.rb:132
|
<1%
|
app/models/subject.rb:132
- Average Self
-
0.33ms
- Average calls
- 0.94x
- Total Self
- 0.31ms
- Total Children
- 0ms
- Total runtime
- 0.31ms
SELECT "subjects".* FROM "subjects" WHERE "subjects"."slug" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/steps.rb:31
|
<1%
|
app/services/diagnosis_creation/steps.rb:31
- Average Self
-
0.28ms
- Average calls
- 0.94x
- Total Self
- 0.27ms
- Total Children
- 0ms
- Total runtime
- 0.27ms
SELECT "needs".* FROM "needs" WHERE "needs"."diagnosis_id" = ?
|
|
sql
app/services/api_consumption/models/facility/api_entreprise.rb:123
|
<1%
|
app/services/api_consumption/models/facility/api_entreprise.rb:123
- Average Self
-
1.1ms
- Average calls
- 0.22x
- Total Self
- 0.24ms
- Total Children
- 0ms
- Total runtime
- 0.24ms
SELECT "institutions".* FROM "institutions" INNER JOIN "categories_institutions" ON "categories_institutions"."institution_id" = "institutions"."id" INNER JOIN "categories" ON "categories"."id" = "categories_institutions"."category_id" WHERE "institutions"."deleted_at" IS NULL AND "categories"."label" = ? AND "institutions"."siren" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:64
|
<1%
|
app/services/diagnosis_creation/find_relevant_expert_subjects.rb:64
- Average Self
-
0.21ms
- Average calls
- 1.1x
- Total Self
- 0.23ms
- Total Children
- 0ms
- Total runtime
- 0.23ms
SELECT "subject_answers".* FROM "subject_answers" WHERE "subject_answers"."type" = ? AND "subject_answers"."subject_questionable_id" = ? AND "subject_answers"."subject_questionable_type" = ? AND "subject_answers"."subject_question_id" = ? LIMIT ?
|
|
sql
app/services/diagnosis_creation/create_matches.rb:22
|
<1%
|
app/services/diagnosis_creation/create_matches.rb:22
- Average Self
-
0.17ms
- Average calls
- 0.92x
- Total Self
- 0.16ms
- Total Children
- 0ms
- Total runtime
- 0.16ms
SELECT "matches".* FROM "matches" INNER JOIN "needs" ON "matches"."need_id" = "needs"."id" WHERE "needs"."diagnosis_id" = ?
|
|
sql
app/models/facility.rb:104
|
<1%
|
app/models/facility.rb:104
- Average Self
-
0.63ms
- Average calls
- 0.22x
- Total Self
- 0.14ms
- Total Children
- 0ms
- Total runtime
- 0.14ms
SELECT "institutions".* FROM "institutions" INNER JOIN "categories_institutions" ON "categories_institutions"."institution_id" = "institutions"."id" INNER JOIN "categories" ON "categories"."id" = "categories_institutions"."category_id" WHERE "institutions"."id" = ? AND "institutions"."deleted_at" IS NULL AND "categories"."label" = ? LIMIT ?
|
|
code
vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/lib/active_support/callbacks.rb:130
|
<1%
|
vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/lib/active_support/callbacks.rb:130
- Average Self
-
0.1ms
- Average calls
- 1x
- Total Self
- 0.1ms
- Total Children
- 2,546ms
- Total runtime
- 2,547ms
CreateAutomaticDiagnosisJob
|
|
sql
app/models/expert_subject.rb:85
|
<1%
|
app/models/expert_subject.rb:85
- Average Self
-
0.18ms
- Average calls
- 0.5x
- Total Self
- 0.09ms
- Total Children
- 0ms
- Total runtime
- 0.09ms
SELECT "institutions".* FROM "institutions" WHERE "institutions"."slug" = ? LIMIT ?
|
|
sql
app/models/expert_subject.rb:83
|
<1%
|
app/models/expert_subject.rb:83
- Average Self
-
0.24ms
- Average calls
- 0.37x
- Total Self
- 0.09ms
- Total Children
- 0ms
- Total runtime
- 0.09ms
SELECT "institutions".* FROM "institutions" WHERE "institutions"."slug" = ? LIMIT ?
|
|
sql
app/models/concerns/mandatory_answers.rb:17
|
<1%
|
app/models/concerns/mandatory_answers.rb:17
- Average Self
-
0.04ms
- Average calls
- 1.9x
- Total Self
- 0.08ms
- Total Children
- 0ms
- Total runtime
- 0.08ms
SELECT ? AS one FROM "subject_questions" WHERE "subject_questions"."subject_id" = ? LIMIT ?
|
|
sql
app/models/concerns/mandatory_answers.rb:19
|
<1%
|
app/models/concerns/mandatory_answers.rb:19
- Average Self
-
0.04ms
- Average calls
- 1.9x
- Total Self
- 0.08ms
- Total Children
- 0ms
- Total runtime
- 0.08ms
SELECT ? AS one FROM "subject_questions" WHERE "subject_questions"."subject_id" = ? LIMIT ?
|
|
code
vendor/bundle/ruby/4.0.0/gems/sidekiq-8.1.6/lib/sidekiq/middleware/chain.rb:182
|
<1%
|
vendor/bundle/ruby/4.0.0/gems/sidekiq-8.1.6/lib/sidekiq/middleware/chain.rb:182
- Average Self
-
0.08ms
- Average calls
- 0.97x
- Total Self
- 0.08ms
- Total Children
- 2,529ms
- Total runtime
- 2,529ms
|
|
sql
app/models/expert_subject.rb:84
|
<1%
|
app/models/expert_subject.rb:84
- Average Self
-
0.21ms
- Average calls
- 0.19x
- Total Self
- 0.04ms
- Total Children
- 0ms
- Total runtime
- 0.04ms
SELECT "institutions".* FROM "institutions" WHERE "institutions"."slug" = ? LIMIT ?
|
|
sql
app/models/diagnosis.rb:225
|
<1%
|
app/models/diagnosis.rb:225
- Average Self
-
0.63ms
- Average calls
- 0.05x
- Total Self
- 0.03ms
- Total Children
- 0ms
- Total runtime
- 0.03ms
SELECT ? AS one FROM "needs" WHERE "needs"."diagnosis_id" = ? LIMIT ?
SELECT "needs".* FROM "needs" WHERE "needs"."diagnosis_id" = ?
|
|
sql
app/models/diagnosis.rb:217
|
<1%
|
app/models/diagnosis.rb:217
- Average Self
-
0ms
- Average calls
- <0.01x
- Total Self
- 0ms
- Total Children
- 0ms
- Total runtime
- 0ms
SELECT "needs".* FROM "needs" WHERE "needs"."diagnosis_id" = ?
|
|
sql
app/services/diagnosis_creation/steps.rb:18
|
<1%
|
app/services/diagnosis_creation/steps.rb:18
- Average Self
-
0ms
- Average calls
- <0.01x
- Total Self
- 0ms
- Total Children
- 0ms
- Total runtime
- 0ms
SELECT "contacts".* FROM "contacts" WHERE "contacts"."id" = ? LIMIT ?
|
|
sql
app/models/concerns/mandatory_answers.rb:24
|
<1%
|
app/models/concerns/mandatory_answers.rb:24
- Average Self
-
0ms
- Average calls
- 0.34x
- Total Self
- 0ms
- Total Children
- 0ms
- Total runtime
- 0ms
SELECT "subject_questions"."id" FROM "subject_questions" WHERE "subject_questions"."subject_id" = ?
|