explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 1pxU

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.083 6.982 ↑ 1.0 1 1

Aggregate (cost=7,317.98..7,317.99 rows=1 width=220) (actual time=6.982..6.982 rows=1 loops=1)

2. 0.005 0.308 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.00..48.28 rows=1 width=220) (actual time=0.304..0.308 rows=1 loops=1)

  • Join Filter: (d.docid = qdr.docid)
3. 0.005 0.270 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.00..45.35 rows=1 width=216) (actual time=0.267..0.270 rows=1 loops=1)

  • Join Filter: (d.docid = dm.docid)
4. 0.179 0.179 ↑ 1.0 1 1

Index Scan using pk_documents on documents d (cost=0.00..33.26 rows=1 width=186) (actual time=0.178..0.179 rows=1 loops=1)

  • Index Cond: (docid = 137956215)
5. 0.086 0.086 ↓ 0.0 0 1

Index Scan using metadocid_idx on documentmetadata dm (cost=0.00..12.07 rows=1 width=38) (actual time=0.086..0.086 rows=0 loops=1)

  • Index Cond: (docid = 137956215)
  • Filter: (type = 'product_name'::text)
6. 0.033 0.033 ↓ 0.0 0 1

Seq Scan on querydocumentrelevance qdr (cost=0.00..2.92 rows=1 width=12) (actual time=0.033..0.033 rows=0 loops=1)

  • Filter: ((docid = 137956215) AND (queryid = 2303))
7.          

SubPlan (forAggregate)

8. 0.095 6.591 ↑ 1.0 1 1

Result (cost=7,269.69..7,269.70 rows=1 width=0) (actual time=6.591..6.591 rows=1 loops=1)

9.          

Initplan (forResult)

10. 1.426 3.159 ↑ 1.0 1 1

Aggregate (cost=4,817.67..4,817.68 rows=1 width=121) (actual time=3.158..3.159 rows=1 loops=1)

11. 0.149 1.733 ↓ 13.0 52 1

HashAggregate (cost=4,817.56..4,817.60 rows=4 width=105) (actual time=1.685..1.733 rows=52 loops=1)

12. 0.060 1.584 ↓ 13.0 52 1

Append (cost=941.37..4,817.49 rows=4 width=105) (actual time=0.720..1.584 rows=52 loops=1)

13. 0.124 1.188 ↓ 26.0 52 1

Nested Loop (cost=941.37..1,966.01 rows=2 width=118) (actual time=0.718..1.188 rows=52 loops=1)

14. 0.072 0.804 ↓ 26.0 52 1

Subquery Scan on "ANY_subquery" (cost=941.37..1,833.81 rows=2 width=8) (actual time=0.704..0.804 rows=52 loops=1)

15. 0.078 0.732 ↓ 26.0 52 1

HashSetOp Except (cost=941.37..1,833.79 rows=2 width=8) (actual time=0.702..0.732 rows=52 loops=1)

16. 0.055 0.654 ↓ 17.3 52 1

Append (cost=941.37..1,833.78 rows=3 width=8) (actual time=0.446..0.654 rows=52 loops=1)

17. 0.064 0.560 ↓ 26.0 52 1

Subquery Scan on "*SELECT* 1" (cost=941.37..981.63 rows=2 width=8) (actual time=0.445..0.560 rows=52 loops=1)

18. 0.100 0.496 ↓ 26.0 52 1

Bitmap Heap Scan on sentences (cost=941.37..981.61 rows=2 width=8) (actual time=0.442..0.496 rows=52 loops=1)

  • Recheck Cond: (sentenceid = ANY ($6))
  • Filter: ((polarityconfidence >= 0::double precision) AND (objectivityconfidence >= 0::double precision))
19.          

Initplan (forBitmap Heap Scan)

20. 0.176 0.176 ↑ 5.0 52 1

Index Scan using sentdocs on sentences (cost=0.00..840.96 rows=259 width=8) (actual time=0.104..0.176 rows=52 loops=1)

  • Index Cond: (docid = d.docid)
21. 0.220 0.220 ↓ 5.2 52 1

Bitmap Index Scan on pk_sentences (cost=0.00..100.41 rows=10 width=0) (actual time=0.220..0.220 rows=52 loops=1)

  • Index Cond: (sentenceid = ANY ($6))
22. 0.001 0.039 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 2" (cost=840.96..852.15 rows=1 width=8) (actual time=0.039..0.039 rows=0 loops=1)

23. 0.038 0.038 ↓ 0.0 0 1

Index Scan using idx_qspoqid on querysentencepolarityoverride (cost=840.96..852.14 rows=1 width=8) (actual time=0.038..0.038 rows=0 loops=1)

  • Index Cond: (queryid = 2303)
  • Filter: (sentenceid = ANY ($7))
24.          

Initplan (forIndex Scan)

25. 0.000 0.000 ↓ 0.0 0

Index Scan using sentdocs on sentences (cost=0.00..840.96 rows=259 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (docid = d.docid)
26. 0.260 0.260 ↑ 1.0 1 52

Index Scan using pk_sentences on sentences (cost=0.00..66.09 rows=1 width=118) (actual time=0.004..0.005 rows=1 loops=52)

  • Index Cond: (sentenceid = "ANY_subquery".sentenceid)
27. 0.001 0.285 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 2" (cost=941.37..1,899.90 rows=1 width=84) (actual time=0.285..0.285 rows=0 loops=1)

28. 0.002 0.284 ↓ 0.0 0 1

Nested Loop (cost=941.37..1,899.89 rows=1 width=84) (actual time=0.284..0.284 rows=0 loops=1)

29. 0.001 0.282 ↓ 0.0 0 1

Subquery Scan on "ANY_subquery" (cost=941.37..1,833.79 rows=1 width=8) (actual time=0.282..0.282 rows=0 loops=1)

30. 0.001 0.281 ↓ 0.0 0 1

HashSetOp Except (cost=941.37..1,833.78 rows=1 width=8) (actual time=0.281..0.281 rows=0 loops=1)

31. 0.003 0.280 ↓ 0.0 0 1

Append (cost=941.37..1,833.77 rows=2 width=8) (actual time=0.280..0.280 rows=0 loops=1)

32. 0.003 0.272 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 1" (cost=941.37..981.62 rows=1 width=8) (actual time=0.272..0.272 rows=0 loops=1)

33. 0.058 0.269 ↓ 0.0 0 1

Bitmap Heap Scan on sentences (cost=941.37..981.61 rows=1 width=8) (actual time=0.269..0.269 rows=0 loops=1)

  • Recheck Cond: (sentenceid = ANY ($3))
  • Filter: ((polarityconfidence < 0::double precision) OR (objectivityconfidence < 0::double precision))
34.          

Initplan (forBitmap Heap Scan)

35. 0.049 0.049 ↑ 5.0 52 1

Index Scan using sentdocs on sentences (cost=0.00..840.96 rows=259 width=8) (actual time=0.007..0.049 rows=52 loops=1)

  • Index Cond: (docid = d.docid)
36. 0.162 0.162 ↓ 5.2 52 1

Bitmap Index Scan on pk_sentences (cost=0.00..100.41 rows=10 width=0) (actual time=0.162..0.162 rows=52 loops=1)

  • Index Cond: (sentenceid = ANY ($3))
37. 0.001 0.005 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 2" (cost=840.96..852.15 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1)

38. 0.004 0.004 ↓ 0.0 0 1

Index Scan using idx_qspoqid on querysentencepolarityoverride (cost=840.96..852.14 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (queryid = 2303)
  • Filter: (sentenceid = ANY ($4))
39.          

Initplan (forIndex Scan)

40. 0.000 0.000 ↓ 0.0 0

Index Scan using sentdocs on sentences (cost=0.00..840.96 rows=259 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (docid = d.docid)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sentences on sentences (cost=0.00..66.09 rows=1 width=84) (actual time=.. rows= loops=0)

  • Index Cond: (sentenceid = "ANY_subquery".sentenceid)
42. 0.004 0.051 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 3" (cost=918.27..951.55 rows=1 width=100) (actual time=0.051..0.051 rows=0 loops=1)

43. 0.013 0.047 ↓ 0.0 0 1

Hash Join (cost=918.27..951.54 rows=1 width=100) (actual time=0.047..0.047 rows=0 loops=1)

  • Hash Cond: (qspo.sentenceid = s.sentenceid)
44.          

Initplan (forHash Join)

45. 0.000 0.000 ↓ 0.0 0

Index Scan using sentdocs on sentences (cost=0.00..840.96 rows=259 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (docid = d.docid)
46. 0.025 0.025 ↑ 1,110.0 1 1

Seq Scan on querysentencepolarityoverride qspo (cost=0.00..29.10 rows=1,110 width=24) (actual time=0.025..0.025 rows=1 loops=1)

47. 0.002 0.009 ↓ 0.0 0 1

Hash (cost=77.29..77.29 rows=1 width=92) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
48. 0.002 0.007 ↓ 0.0 0 1

Nested Loop (cost=11.18..77.29 rows=1 width=92) (actual time=0.007..0.007 rows=0 loops=1)

49. 0.000 0.005 ↓ 0.0 0 1

HashAggregate (cost=11.18..11.19 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1)

50. 0.005 0.005 ↓ 0.0 0 1

Index Scan using idx_qspoqid on querysentencepolarityoverride (cost=0.00..11.18 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (queryid = 2303)
  • Filter: (sentenceid = ANY ($1))
51. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sentences on sentences s (cost=0.00..66.09 rows=1 width=84) (actual time=.. rows= loops=0)

  • Index Cond: (sentenceid = public.querysentencepolarityoverride.sentenceid)
52. 0.022 3.337 ↑ 1.0 1 1

Result (cost=2,452.00..2,452.01 rows=1 width=0) (actual time=3.336..3.337 rows=1 loops=1)

53.          

Initplan (forResult)

54. 0.662 3.315 ↑ 1.0 1 1

Aggregate (cost=2,451.99..2,452.00 rows=1 width=19) (actual time=3.314..3.315 rows=1 loops=1)

55. 0.202 2.653 ↓ 25.0 75 1

Nested Loop (cost=0.00..2,451.99 rows=3 width=19) (actual time=0.154..2.653 rows=75 loops=1)

56. 1.176 1.176 ↑ 2.9 75 1

Index Scan using catexecdoci_idx on queryexecutioncategorydocuments qecd (cost=0.00..632.26 rows=215 width=8) (actual time=0.066..1.176 rows=75 loops=1)

  • Index Cond: (docid = d.docid)
  • Filter: (NOT invisible)
57. 1.275 1.275 ↑ 1.0 1 75

Index Scan using pk_queryexecutioncategories on queryexecutioncategories qec (cost=0.00..8.45 rows=1 width=27) (actual time=0.016..0.017 rows=1 loops=75)

  • Index Cond: (queryexecutioncategoryid = qecd.queryexecutioncategoryid)
  • Filter: (queryexecutionid = 2029)