Query Metrics

76 Database Queries
41 Different statements
385.37 ms Query time
0 Invalid entities
256 Managed entities

Queries

Group similar statements

# Time Info
1 1.91 ms
SELECT id FROM language WHERE shortcode = 'bg' limit 1
Parameters:
[]
2 15.13 ms
SELECT MAX(sl.datemod)
				FROM ui_string_language sl
				JOIN ui_string s ON s.id = sl.ui_string_id
				WHERE sl.language_id IN (65, 123)
				AND s.is_active AND s.type_id IN (1, 3)
Parameters:
[]
3 27.29 ms
SELECT DISTINCT s.name,
								CASE WHEN sl2.id IS NULL THEN sl.text ELSE sl2.text END AS text,
								s.fix_quote
						FROM (SELECT * FROM ui_string_language WHERE language_id = 123) sl
						JOIN ui_string s ON s.id = sl.ui_string_id
						LEFT JOIN (SELECT * FROM ui_string_language
									WHERE language_id = 65
									AND text IS NOT NULL AND text <> '') sl2
						ON s.id = sl2.ui_string_id
						WHERE s.is_active AND s.type_id IN (1, 3)
Parameters:
[]
4 3.54 ms
SELECT t0.id AS id_1, t0.translatedtitle AS translatedtitle_2, t0.name AS name_3, t0.description AS description_4, t0.url AS url_5, t0.ispublic AS ispublic_6, t0.audience AS audience_7, t0.isoriginal AS isoriginal_8, t0.islanguagedefault AS islanguagedefault_9, t0.type_id AS type_id_10, t0.translationmethod_id AS translationmethod_id_11, t0.public_file AS public_file_12, t0.doc_link AS doc_link_13, t0.work_id AS work_id_14, t0.language_id AS language_id_15 FROM expositiontranslation t0 WHERE t0.url = ? AND t0.ispublic = ? AND t0.type_id = ? LIMIT 1
Parameters:
[
  "doctrine-of-sacred-scripture-rogers"
  1
  1
]
5 0.77 ms
select t.id from expositiontranslation t WHERE t.url = 'doctrine-of-sacred-scripture-rogers' and  (t.ispublic and not t.restricted_access)
Parameters:
[]
6 0.80 ms
SELECT t0.id AS id_1, t0.title AS title_2, t0.fulltitle AS fulltitle_3, t0.description AS description_4, t0.url AS url_5, t0.ispublic AS ispublic_6, t0.audience AS audience_7, t0.swedenborgtype AS swedenborgtype_8 FROM expositionwork t0 WHERE t0.id = ?
Parameters:
[
  20
]
7 1.85 ms
SELECT e0_.id AS id_0, e0_.ordering AS ordering_1, e0_.title AS title_2, e0_.swedenborgsection AS swedenborgsection_3, e0_.division_id AS division_id_4 FROM expositionpassage e0_, expositiondivision e1_, expositionwork e2_ WHERE e0_.swedenborgsection = ? AND e0_.division_id = e1_.id AND e1_.work_id = e2_.id AND e2_.id = ? AND e2_.ispublic = true
Parameters:
[
  "1"
  20
]
8 5.33 ms
SELECT text_style_override  FROM language WHERE id = 123
Parameters:
[]
9 1.49 ms
SELECT credit, sourcelink from bibliographicdata b, translation_bibliographicdata tb WHERE tb.translation_id = 10477 and tb.bibliographicdata_id = b.id and sourcelink is not null and credit is not null
Parameters:
[]
10 0.53 ms
SELECT t0.id AS id_1, t0.name AS name_2, t0.url AS url_3, t0.ordering AS ordering_4, t0.work_id AS work_id_5, t0.superdivision_id AS superdivision_id_6 FROM expositiondivision t0 WHERE t0.id = ?
Parameters:
[
  39
]
11 3.11 ms
SELECT p.id, t.url as translation_url, d.url as division_url,  (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering < 10 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering desc limit 1
Parameters:
[]
12 8.02 ms
SELECT p.id, t.url as translation_url, d.url as division_url, (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering > 10 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering limit 1
Parameters:
[]
13 4.72 ms
SELECT t.name, t.translatedtitle, (case when b.datecreated is null then '' else ' (' || b.datecreated || ')' end) as datestr, w.title as work_title, t.isoriginal, t.language_id FROM language l, expositionwork w, expositiontranslation t left join (select tb.translation_id, b.datecreated from bibliographicdata b, translation_bibliographicdata tb where b.id = tb.bibliographicdata_id) as b on t.id = b.translation_id WHERE t.id = 10477 and t.work_id = w.id and t.language_id = l.id
Parameters:
[]
14 0.43 ms
select text from ui_string_language where ui_string_id = 469 and language_id = 123
Parameters:
[]
15 21.26 ms
SELECT 'bible_' || t.url || '_' || cb.url || '_' || cc.ordering as link_spec, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end) as priority_order, cb.url as book_url, t.url as trans_url, cc.ordering as chapter_order  FROM canonicalbibleverse cv, canonicalbiblechapter cc, canonicalbiblebook cb, biblebook b, bibletranslation t WHERE (cv.id in (select verse_id from verse_passage where passage_id = 9443 and iscorepassage) or cc.id in (select chapter_id from chapter_passage where passage_id = 9443) ) and cv.chapter_id = cc.id and cc.book_id = cb.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by priority_order asc, t.languagedefault desc limit 1
Parameters:
[]
16 3.63 ms
select di1.text as footnote, array_to_string(array_agg(di3.text order by di3.tu_order, di3.ordering),' ') as footnote_text from expositiondisplayitem di1, (select di2.text, di2.ordering, di2.containingitem_id, tu.ordering as tu_order from expositiondisplayitem di2, expositiontranslationtext tt, expositiontextunit tu where tu.passage_id = 9443 and tt.translation_id = 10477 and tu.id = tt.placement_id and di2.container_id = tt.id order by di2.ordering) as di3 where di3.containingitem_id = di1.id group by di1.text
Parameters:
[]
17 32.03 ms
select * from (SELECT distinct on (di.ref_id) di.ref_id, 'bible_' || t.url || '_' || cb.url || '_' || cc1.ordering || (case when cc1.id <> cc2.id then '-' || cc2.ordering else '' end) || '_' || cv1.ordering || (case when rb.startverse_id <> rb.endverse_id then '-' || cv2.ordering else '' end) as multilink, true as is_bibleref, 1 as section_order, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 1 else case when t.language_id = 123 then 2 else 3 end end ) as priority_order, cb.url as book_url, t.url as trans_url, cc1.ordering as chapter_order1, cc2.ordering as chapter_order2, cv1.ordering as verse_order1, cv2.ordering as verse_order2, t.url as div_url, 0 as passage_order FROM refbible rb, expositiontextunit tu, expositiontranslationtext tt, expositiondisplayitem di, canonicalbibleverse cv1, canonicalbiblechapter cc1, canonicalbiblebook cb, canonicalbibleverse cv2, canonicalbiblechapter cc2, biblebook b, bibletranslation t  WHERE tu.passage_id = 9443 and tu.id = tt.placement_id and rb.container_id = di.ref_id and di.container_id = tt.id and di.ref_id is not null and cv1.id = rb.startverse_id and cv1.chapter_id = cc1.id and cc1.book_id = cb.id and cv2.id = rb.endverse_id and cv2.chapter_id = cc2.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by di.ref_id, priority_order asc, t.languagedefault desc) as b union select * from (SELECT distinct on (di.ref_id) di.ref_id, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as multilink, false as is_bibleref, t2.ordering as section_order,  (case when t.id = 10477 then 1 else case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end end) as priority_order, t.url as book_url, t.url as trans_url, 0 as chapter_order1, 0 as chapter_order2, 0 as verse_order1, 0 as verse_order2, d.url as div_url, p.ordering as passage_order FROM refexposition re, expositiontextunit tu, expositiontextunit t2, expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiondisplayitem di, expositionwork w, expositiontranslation t WHERE tu.passage_id = 9443 and t2.id = re.startlocation_id and p.id = t2.passage_id and d.id = p.division_id and re.container_id = di.ref_id and tu.id = tt.placement_id and di.container_id = tt.id and di.ref_id is not null and d.work_id = w.id and w.id = t.work_id and t.url is not null and  (t.ispublic and not t.restricted_access)  and w.ispublic order by di.ref_id, priority_order asc, t.islanguagedefault desc, t.isoriginal desc) as e
Parameters:
[]
18 5.74 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
19 0.54 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.subsection AS subsection_3, t0.passage_id AS passage_id_4 FROM expositiontextunit t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9443
]
20 1.53 ms
SELECT t0.id AS id_1, t0.text AS text_2, t0.textvector AS textvector_3, t0.translation_id AS translation_id_4, t0.placement_id AS placement_id_5 FROM expositiontranslationtext t0 WHERE t0.placement_id = ?
Parameters:
[
  9443
]
21 3.87 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
22 4.40 ms
SELECT t0.id AS id_1, t0.translatedtitle AS translatedtitle_2, t0.name AS name_3, t0.description AS description_4, t0.url AS url_5, t0.ispublic AS ispublic_6, t0.audience AS audience_7, t0.isoriginal AS isoriginal_8, t0.islanguagedefault AS islanguagedefault_9, t0.type_id AS type_id_10, t0.translationmethod_id AS translationmethod_id_11, t0.public_file AS public_file_12, t0.doc_link AS doc_link_13, t0.work_id AS work_id_14, t0.language_id AS language_id_15 FROM expositiontranslation t0 WHERE t0.url = ? AND t0.ispublic = ? AND t0.type_id = ? LIMIT 1
Parameters:
[
  "doctrine-of-sacred-scripture-rogers"
  1
  1
]
23 0.42 ms
select t.id from expositiontranslation t WHERE t.url = 'doctrine-of-sacred-scripture-rogers' and  (t.ispublic and not t.restricted_access)
Parameters:
[]
24 0.66 ms
SELECT e0_.id AS id_0, e0_.ordering AS ordering_1, e0_.title AS title_2, e0_.swedenborgsection AS swedenborgsection_3, e0_.division_id AS division_id_4 FROM expositionpassage e0_, expositiondivision e1_, expositionwork e2_ WHERE e0_.swedenborgsection = ? AND e0_.division_id = e1_.id AND e1_.work_id = e2_.id AND e2_.id = ? AND e2_.ispublic = true
Parameters:
[
  "4"
  20
]
25 0.31 ms
SELECT text_style_override  FROM language WHERE id = 123
Parameters:
[]
26 0.45 ms
SELECT credit, sourcelink from bibliographicdata b, translation_bibliographicdata tb WHERE tb.translation_id = 10477 and tb.bibliographicdata_id = b.id and sourcelink is not null and credit is not null
Parameters:
[]
27 1.76 ms
SELECT p.id, t.url as translation_url, d.url as division_url,  (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering < 40 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering desc limit 1
Parameters:
[]
28 3.08 ms
SELECT p.id, t.url as translation_url, d.url as division_url, (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering > 40 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering limit 1
Parameters:
[]
29 0.97 ms
SELECT t.name, t.translatedtitle, (case when b.datecreated is null then '' else ' (' || b.datecreated || ')' end) as datestr, w.title as work_title, t.isoriginal, t.language_id FROM language l, expositionwork w, expositiontranslation t left join (select tb.translation_id, b.datecreated from bibliographicdata b, translation_bibliographicdata tb where b.id = tb.bibliographicdata_id) as b on t.id = b.translation_id WHERE t.id = 10477 and t.work_id = w.id and t.language_id = l.id
Parameters:
[]
30 5.44 ms
select text from ui_string_language where ui_string_id = 469 and language_id = 123
Parameters:
[]
31 17.94 ms
SELECT 'bible_' || t.url || '_' || cb.url || '_' || cc.ordering as link_spec, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end) as priority_order, cb.url as book_url, t.url as trans_url, cc.ordering as chapter_order  FROM canonicalbibleverse cv, canonicalbiblechapter cc, canonicalbiblebook cb, biblebook b, bibletranslation t WHERE (cv.id in (select verse_id from verse_passage where passage_id = 9440 and iscorepassage) or cc.id in (select chapter_id from chapter_passage where passage_id = 9440) ) and cv.chapter_id = cc.id and cc.book_id = cb.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by priority_order asc, t.languagedefault desc limit 1
Parameters:
[]
32 1.42 ms
select di1.text as footnote, array_to_string(array_agg(di3.text order by di3.tu_order, di3.ordering),' ') as footnote_text from expositiondisplayitem di1, (select di2.text, di2.ordering, di2.containingitem_id, tu.ordering as tu_order from expositiondisplayitem di2, expositiontranslationtext tt, expositiontextunit tu where tu.passage_id = 9440 and tt.translation_id = 10477 and tu.id = tt.placement_id and di2.container_id = tt.id order by di2.ordering) as di3 where di3.containingitem_id = di1.id group by di1.text
Parameters:
[]
33 25.40 ms
select * from (SELECT distinct on (di.ref_id) di.ref_id, 'bible_' || t.url || '_' || cb.url || '_' || cc1.ordering || (case when cc1.id <> cc2.id then '-' || cc2.ordering else '' end) || '_' || cv1.ordering || (case when rb.startverse_id <> rb.endverse_id then '-' || cv2.ordering else '' end) as multilink, true as is_bibleref, 1 as section_order, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 1 else case when t.language_id = 123 then 2 else 3 end end ) as priority_order, cb.url as book_url, t.url as trans_url, cc1.ordering as chapter_order1, cc2.ordering as chapter_order2, cv1.ordering as verse_order1, cv2.ordering as verse_order2, t.url as div_url, 0 as passage_order FROM refbible rb, expositiontextunit tu, expositiontranslationtext tt, expositiondisplayitem di, canonicalbibleverse cv1, canonicalbiblechapter cc1, canonicalbiblebook cb, canonicalbibleverse cv2, canonicalbiblechapter cc2, biblebook b, bibletranslation t  WHERE tu.passage_id = 9440 and tu.id = tt.placement_id and rb.container_id = di.ref_id and di.container_id = tt.id and di.ref_id is not null and cv1.id = rb.startverse_id and cv1.chapter_id = cc1.id and cc1.book_id = cb.id and cv2.id = rb.endverse_id and cv2.chapter_id = cc2.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by di.ref_id, priority_order asc, t.languagedefault desc) as b union select * from (SELECT distinct on (di.ref_id) di.ref_id, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as multilink, false as is_bibleref, t2.ordering as section_order,  (case when t.id = 10477 then 1 else case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end end) as priority_order, t.url as book_url, t.url as trans_url, 0 as chapter_order1, 0 as chapter_order2, 0 as verse_order1, 0 as verse_order2, d.url as div_url, p.ordering as passage_order FROM refexposition re, expositiontextunit tu, expositiontextunit t2, expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiondisplayitem di, expositionwork w, expositiontranslation t WHERE tu.passage_id = 9440 and t2.id = re.startlocation_id and p.id = t2.passage_id and d.id = p.division_id and re.container_id = di.ref_id and tu.id = tt.placement_id and di.container_id = tt.id and di.ref_id is not null and d.work_id = w.id and w.id = t.work_id and t.url is not null and  (t.ispublic and not t.restricted_access)  and w.ispublic order by di.ref_id, priority_order asc, t.islanguagedefault desc, t.isoriginal desc) as e
Parameters:
[]
34 4.79 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
35 3.14 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.subsection AS subsection_3, t0.passage_id AS passage_id_4 FROM expositiontextunit t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9440
]
36 1.31 ms
SELECT t0.id AS id_1, t0.text AS text_2, t0.textvector AS textvector_3, t0.translation_id AS translation_id_4, t0.placement_id AS placement_id_5 FROM expositiontranslationtext t0 WHERE t0.placement_id = ?
Parameters:
[
  9440
]
37 3.60 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
38 0.62 ms
SELECT t0.id AS id_1, t0.translatedtitle AS translatedtitle_2, t0.name AS name_3, t0.description AS description_4, t0.url AS url_5, t0.ispublic AS ispublic_6, t0.audience AS audience_7, t0.isoriginal AS isoriginal_8, t0.islanguagedefault AS islanguagedefault_9, t0.type_id AS type_id_10, t0.translationmethod_id AS translationmethod_id_11, t0.public_file AS public_file_12, t0.doc_link AS doc_link_13, t0.work_id AS work_id_14, t0.language_id AS language_id_15 FROM expositiontranslation t0 WHERE t0.url = ? AND t0.ispublic = ? AND t0.type_id = ? LIMIT 1
Parameters:
[
  "doctrine-of-sacred-scripture-rogers"
  1
  1
]
39 0.33 ms
select t.id from expositiontranslation t WHERE t.url = 'doctrine-of-sacred-scripture-rogers' and  (t.ispublic and not t.restricted_access)
Parameters:
[]
40 0.66 ms
SELECT e0_.id AS id_0, e0_.ordering AS ordering_1, e0_.title AS title_2, e0_.swedenborgsection AS swedenborgsection_3, e0_.division_id AS division_id_4 FROM expositionpassage e0_, expositiondivision e1_, expositionwork e2_ WHERE e0_.swedenborgsection = ? AND e0_.division_id = e1_.id AND e1_.work_id = e2_.id AND e2_.id = ? AND e2_.ispublic = true
Parameters:
[
  "37"
  20
]
41 3.12 ms
SELECT text_style_override  FROM language WHERE id = 123
Parameters:
[]
42 0.52 ms
SELECT credit, sourcelink from bibliographicdata b, translation_bibliographicdata tb WHERE tb.translation_id = 10477 and tb.bibliographicdata_id = b.id and sourcelink is not null and credit is not null
Parameters:
[]
43 2.27 ms
SELECT p.id, t.url as translation_url, d.url as division_url,  (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering < 370 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering desc limit 1
Parameters:
[]
44 2.67 ms
SELECT p.id, t.url as translation_url, d.url as division_url, (case when p.swedenborgsection is not null then p.swedenborgsection else cast(p.ordering as text) end) as passage_num, p.ordering as passage_order, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '_' || p.ordering end) as multi_spec  FROM expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiontextunit tu, expositiontranslation t, expositionwork w WHERE d.work_id = 20 and p.division_id = d.id and p.ordering > 370 and tt.translation_id=10477 and tt.placement_id = tu.id and tu.passage_id = p.id and t.id = tt.translation_id and d.work_id = w.id order by p.ordering limit 1
Parameters:
[]
45 0.96 ms
SELECT t.name, t.translatedtitle, (case when b.datecreated is null then '' else ' (' || b.datecreated || ')' end) as datestr, w.title as work_title, t.isoriginal, t.language_id FROM language l, expositionwork w, expositiontranslation t left join (select tb.translation_id, b.datecreated from bibliographicdata b, translation_bibliographicdata tb where b.id = tb.bibliographicdata_id) as b on t.id = b.translation_id WHERE t.id = 10477 and t.work_id = w.id and t.language_id = l.id
Parameters:
[]
46 0.30 ms
select text from ui_string_language where ui_string_id = 469 and language_id = 123
Parameters:
[]
47 18.54 ms
SELECT 'bible_' || t.url || '_' || cb.url || '_' || cc.ordering as link_spec, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end) as priority_order, cb.url as book_url, t.url as trans_url, cc.ordering as chapter_order  FROM canonicalbibleverse cv, canonicalbiblechapter cc, canonicalbiblebook cb, biblebook b, bibletranslation t WHERE (cv.id in (select verse_id from verse_passage where passage_id = 9407 and iscorepassage) or cc.id in (select chapter_id from chapter_passage where passage_id = 9407) ) and cv.chapter_id = cc.id and cc.book_id = cb.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by priority_order asc, t.languagedefault desc limit 1
Parameters:
[]
48 1.51 ms
select di1.text as footnote, array_to_string(array_agg(di3.text order by di3.tu_order, di3.ordering),' ') as footnote_text from expositiondisplayitem di1, (select di2.text, di2.ordering, di2.containingitem_id, tu.ordering as tu_order from expositiondisplayitem di2, expositiontranslationtext tt, expositiontextunit tu where tu.passage_id = 9407 and tt.translation_id = 10477 and tu.id = tt.placement_id and di2.container_id = tt.id order by di2.ordering) as di3 where di3.containingitem_id = di1.id group by di1.text
Parameters:
[]
49 22.80 ms
select * from (SELECT distinct on (di.ref_id) di.ref_id, 'bible_' || t.url || '_' || cb.url || '_' || cc1.ordering || (case when cc1.id <> cc2.id then '-' || cc2.ordering else '' end) || '_' || cv1.ordering || (case when rb.startverse_id <> rb.endverse_id then '-' || cv2.ordering else '' end) as multilink, true as is_bibleref, 1 as section_order, (case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 1 else case when t.language_id = 123 then 2 else 3 end end ) as priority_order, cb.url as book_url, t.url as trans_url, cc1.ordering as chapter_order1, cc2.ordering as chapter_order2, cv1.ordering as verse_order1, cv2.ordering as verse_order2, t.url as div_url, 0 as passage_order FROM refbible rb, expositiontextunit tu, expositiontranslationtext tt, expositiondisplayitem di, canonicalbibleverse cv1, canonicalbiblechapter cc1, canonicalbiblebook cb, canonicalbibleverse cv2, canonicalbiblechapter cc2, biblebook b, bibletranslation t  WHERE tu.passage_id = 9407 and tu.id = tt.placement_id and rb.container_id = di.ref_id and di.container_id = tt.id and di.ref_id is not null and cv1.id = rb.startverse_id and cv1.chapter_id = cc1.id and cc1.book_id = cb.id and cv2.id = rb.endverse_id and cv2.chapter_id = cc2.id and b.canonicalization_id = cb.id and b.translation_id = t.id and  (t.enabled and not t.restricted_access)  order by di.ref_id, priority_order asc, t.languagedefault desc) as b union select * from (SELECT distinct on (di.ref_id) di.ref_id, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as multilink, false as is_bibleref, t2.ordering as section_order,  (case when t.id = 10477 then 1 else case when t.language_id in (select language_id from expositiontranslation where id = 10477) then 2 else case when t.language_id = 123 then 3 else 4 end end end) as priority_order, t.url as book_url, t.url as trans_url, 0 as chapter_order1, 0 as chapter_order2, 0 as verse_order1, 0 as verse_order2, d.url as div_url, p.ordering as passage_order FROM refexposition re, expositiontextunit tu, expositiontextunit t2, expositionpassage p, expositiondivision d, expositiontranslationtext tt, expositiondisplayitem di, expositionwork w, expositiontranslation t WHERE tu.passage_id = 9407 and t2.id = re.startlocation_id and p.id = t2.passage_id and d.id = p.division_id and re.container_id = di.ref_id and tu.id = tt.placement_id and di.container_id = tt.id and di.ref_id is not null and d.work_id = w.id and w.id = t.work_id and t.url is not null and  (t.ispublic and not t.restricted_access)  and w.ispublic order by di.ref_id, priority_order asc, t.islanguagedefault desc, t.isoriginal desc) as e
Parameters:
[]
50 6.59 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
51 0.54 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.subsection AS subsection_3, t0.passage_id AS passage_id_4 FROM expositiontextunit t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9407
]
52 0.68 ms
SELECT t0.id AS id_1, t0.text AS text_2, t0.textvector AS textvector_3, t0.translation_id AS translation_id_4, t0.placement_id AS placement_id_5 FROM expositiontranslationtext t0 WHERE t0.placement_id = ?
Parameters:
[
  9407
]
53 6.64 ms
select tt.toc_text, wt.startpassage_id, p.swedenborgsection as startpassagenum, p2.swedenborgsection as endpassagenum, t.url as translation_url, d.url as division_url, p.ordering as startpassageorder, p2.ordering as endpassageorder, (case when w.swedenborgtype is not null then 'swedenborg' else 'explanation' end) || '_' || t.url || (case when p.swedenborgsection is not null then '_' || p.swedenborgsection else '' end) as link_spec from expositiontranslationtoc tt, expositionwork w, expositiontranslation t, expositiondivision d, expositionpassage p, expositionworktoc wt left join expositionpassage p2 on wt.endpassage_id = p2.id where tt.translation_id = 10477 and tt.worktoc_id = wt.id and wt.startpassage_id = p.id and tt.translation_id = t.id and p.division_id = d.id and t.work_id = w.id order by p.ordering limit 1
Parameters:
[]
54 0.86 ms
SELECT w.book_id FROM expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id limit 1
Parameters:
[]
55 29.29 ms
select distinct on (chapter_order) * from (SELECT t.id as translation_id, t.url as translation_url, bs.name as explanationtitle, 'explanation' || '_' || t.url as explanation_spec, cbc.ordering as chapter_order, case when t.language_id = 123 then 1 else case when t.language_id = 123 then 2 end end as lang_order, case when t.id = 10477 then 1 else case when t.language_id = 123 then 2 else case when t.islanguagedefault then 3 else 4 end end end as trans_order, w.id as work_id, bs.id as story_id, t.language_id, (case when l.nativename is not null and l.nativename <> '' then l.nativename else l.name end) as language_name FROM expositionwork w, expositiontranslation t, story_work sw, biblestory bs, canonicalbiblechapter cbc, language l WHERE bs.chapter_id in (select id from canonicalbiblechapter where book_id in (select book_id from biblestory bs2, story_work sw2, canonicalbiblechapter cbc2 where sw2.work_id = 20 and sw2.story_id = bs2.id and cbc2.id = bs2.chapter_id)) and sw.story_id = bs.id and w.id = sw.work_id and t.work_id=w.id and cbc.id = bs.chapter_id and t.language_id = l.id and w.ispublic AND t.ispublic order by cbc.ordering, lang_order, trans_order, t.is_modern desc, sw.ordering) as t
Parameters:
[]
56 0.99 ms
SELECT w.book_id FROM expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id limit 1
Parameters:
[]
57 23.88 ms
select distinct on (chapter_order) * from (SELECT t.id as translation_id, t.url as translation_url, bs.name as explanationtitle, 'explanation' || '_' || t.url as explanation_spec, cbc.ordering as chapter_order, case when t.language_id = 123 then 1 else case when t.language_id = 123 then 2 end end as lang_order, case when t.id = 10477 then 1 else case when t.language_id = 123 then 2 else case when t.islanguagedefault then 3 else 4 end end end as trans_order, w.id as work_id, bs.id as story_id, t.language_id, (case when l.nativename is not null and l.nativename <> '' then l.nativename else l.name end) as language_name FROM expositionwork w, expositiontranslation t, story_work sw, biblestory bs, canonicalbiblechapter cbc, language l WHERE bs.chapter_id in (select id from canonicalbiblechapter where book_id in (select book_id from biblestory bs2, story_work sw2, canonicalbiblechapter cbc2 where sw2.work_id = 20 and sw2.story_id = bs2.id and cbc2.id = bs2.chapter_id)) and sw.story_id = bs.id and w.id = sw.work_id and t.work_id=w.id and cbc.id = bs.chapter_id and t.language_id = l.id and w.ispublic AND t.ispublic order by cbc.ordering, lang_order, trans_order, t.is_modern desc, sw.ordering) as t
Parameters:
[]
58 0.81 ms
SELECT w.book_id FROM expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id limit 1
Parameters:
[]
59 23.65 ms
select distinct on (chapter_order) * from (SELECT t.id as translation_id, t.url as translation_url, bs.name as explanationtitle, 'explanation' || '_' || t.url as explanation_spec, cbc.ordering as chapter_order, case when t.language_id = 123 then 1 else case when t.language_id = 123 then 2 end end as lang_order, case when t.id = 10477 then 1 else case when t.language_id = 123 then 2 else case when t.islanguagedefault then 3 else 4 end end end as trans_order, w.id as work_id, bs.id as story_id, t.language_id, (case when l.nativename is not null and l.nativename <> '' then l.nativename else l.name end) as language_name FROM expositionwork w, expositiontranslation t, story_work sw, biblestory bs, canonicalbiblechapter cbc, language l WHERE bs.chapter_id in (select id from canonicalbiblechapter where book_id in (select book_id from biblestory bs2, story_work sw2, canonicalbiblechapter cbc2 where sw2.work_id = 20 and sw2.story_id = bs2.id and cbc2.id = bs2.chapter_id)) and sw.story_id = bs.id and w.id = sw.work_id and t.work_id=w.id and cbc.id = bs.chapter_id and t.language_id = l.id and w.ispublic AND t.ispublic order by cbc.ordering, lang_order, trans_order, t.is_modern desc, sw.ordering) as t
Parameters:
[]
60 1.03 ms
select case when w.swedenborgtype is null then false else true end as sw from expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id
Parameters:
[]
61 0.69 ms
select case when w.swedenborgtype is null then false else true end as sw from expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id
Parameters:
[]
62 0.45 ms
select case when w.swedenborgtype is null then false else true end as sw from expositionwork w, expositiontranslation t where t.id = 10477 and t.work_id = w.id
Parameters:
[]
63 1.13 ms
SELECT lower(l.shortcode) AS shortcode, (CASE WHEN l.nativename IS NOT NULL AND l.nativename <> '' THEN l.nativename ELSE l.name END) AS name FROM language l INNER JOIN languageforui lui ON lui.language_id = l.id WHERE l.shortcode IS NOT NULL AND l.shortcode <> '' ORDER BY name
Parameters:
[]
64 0.95 ms
SELECT t0.id AS id_1, t0.translatedtitle AS translatedtitle_2, t0.name AS name_3, t0.description AS description_4, t0.url AS url_5, t0.ispublic AS ispublic_6, t0.audience AS audience_7, t0.isoriginal AS isoriginal_8, t0.islanguagedefault AS islanguagedefault_9, t0.type_id AS type_id_10, t0.translationmethod_id AS translationmethod_id_11, t0.public_file AS public_file_12, t0.doc_link AS doc_link_13, t0.work_id AS work_id_14, t0.language_id AS language_id_15 FROM expositiontranslation t0 WHERE t0.work_id = ?
Parameters:
[
  20
]
65 0.99 ms
SELECT t0.id AS id_1, t0.name AS name_2, t0.url AS url_3, t0.ispublic AS ispublic_4, t0.level_id AS level_id_5, t0.startverse_id AS startverse_id_6, t0.endverse_id AS endverse_id_7, t0.chapter_id AS chapter_id_8 FROM biblestory t0 INNER JOIN story_work ON t0.id = story_work.story_id WHERE story_work.work_id = ?
Parameters:
[
  20
]
66 0.53 ms
SELECT t0.id AS id_1, t0.name AS name_2, t0.url AS url_3, t0.ordering AS ordering_4, t0.work_id AS work_id_5, t0.superdivision_id AS superdivision_id_6 FROM expositiondivision t0 WHERE t0.work_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  20
]
67 0.50 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.title AS title_3, t0.swedenborgsection AS swedenborgsection_4, t0.division_id AS division_id_5 FROM expositionpassage t0 WHERE t0.division_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  39
]
68 1.56 ms
SELECT t0.id AS id_1, t0.recordnumber AS recordnumber_2, t0.file AS file_3, t0.title AS title_4, t0.description AS description_5, t0.author AS author_6, t0.credit AS credit_7, t0.link AS link_8, t0.date AS date_9, t0.license AS license_10, t0.width AS width_11, t0.height AS height_12, t0.language_id AS language_id_13, t0.mediatype_id AS mediatype_id_14 FROM image t0 INNER JOIN textunit_image ON t0.id = textunit_image.image_id WHERE textunit_image.textunit_id = ?
Parameters:
[
  9443
]
69 0.48 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.flags AS flags_3, t0.searchable AS searchable_4, t0.text AS text_5, t0.type_id AS type_id_6, t0.container_id AS container_id_7, t0.containingitem_id AS containingitem_id_8, t0.ref_id AS ref_id_9, t0.image_id AS image_id_10, t0.embed_id AS embed_id_11 FROM expositiondisplayitem t0 WHERE t0.container_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  5383550
]
70 3.09 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.passage_id AS passage_id_3, t0.embed_id AS embed_id_4 FROM passage_media t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9443
]
71 0.87 ms
SELECT t0.id AS id_1, t0.recordnumber AS recordnumber_2, t0.file AS file_3, t0.title AS title_4, t0.description AS description_5, t0.author AS author_6, t0.credit AS credit_7, t0.link AS link_8, t0.date AS date_9, t0.license AS license_10, t0.width AS width_11, t0.height AS height_12, t0.language_id AS language_id_13, t0.mediatype_id AS mediatype_id_14 FROM image t0 INNER JOIN textunit_image ON t0.id = textunit_image.image_id WHERE textunit_image.textunit_id = ?
Parameters:
[
  9440
]
72 0.39 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.flags AS flags_3, t0.searchable AS searchable_4, t0.text AS text_5, t0.type_id AS type_id_6, t0.container_id AS container_id_7, t0.containingitem_id AS containingitem_id_8, t0.ref_id AS ref_id_9, t0.image_id AS image_id_10, t0.embed_id AS embed_id_11 FROM expositiondisplayitem t0 WHERE t0.container_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  5383557
]
73 0.32 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.passage_id AS passage_id_3, t0.embed_id AS embed_id_4 FROM passage_media t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9440
]
74 2.18 ms
SELECT t0.id AS id_1, t0.recordnumber AS recordnumber_2, t0.file AS file_3, t0.title AS title_4, t0.description AS description_5, t0.author AS author_6, t0.credit AS credit_7, t0.link AS link_8, t0.date AS date_9, t0.license AS license_10, t0.width AS width_11, t0.height AS height_12, t0.language_id AS language_id_13, t0.mediatype_id AS mediatype_id_14 FROM image t0 INNER JOIN textunit_image ON t0.id = textunit_image.image_id WHERE textunit_image.textunit_id = ?
Parameters:
[
  9407
]
75 2.67 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.flags AS flags_3, t0.searchable AS searchable_4, t0.text AS text_5, t0.type_id AS type_id_6, t0.container_id AS container_id_7, t0.containingitem_id AS containingitem_id_8, t0.ref_id AS ref_id_9, t0.image_id AS image_id_10, t0.embed_id AS embed_id_11 FROM expositiondisplayitem t0 WHERE t0.container_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  5383618
]
76 0.70 ms
SELECT t0.id AS id_1, t0.ordering AS ordering_2, t0.passage_id AS passage_id_3, t0.embed_id AS embed_id_4 FROM passage_media t0 WHERE t0.passage_id = ? ORDER BY t0.ordering ASC
Parameters:
[
  9407
]

Database Connections

Name Service
default doctrine.dbal.default_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Managed Entities

default entity manager

Class Amount of managed objects
NCBS\WebsiteBundle\Entity\Exposition\Passage 119
NCBS\WebsiteBundle\Entity\Exposition\TranslationText 80
NCBS\WebsiteBundle\Entity\Exposition\Translation 28
NCBS\WebsiteBundle\Entity\Language 18
NCBS\WebsiteBundle\Entity\Exposition\DisplayItem 5
NCBS\WebsiteBundle\Entity\Exposition\TextUnit 3
NCBS\WebsiteBundle\Entity\Exposition\Work 1
NCBS\WebsiteBundle\Entity\Exposition\Division 1
NCBS\WebsiteBundle\Entity\Reference\CombinedReference 1