• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

berkmancenter / mediacloud / 4453 / 3
54%
master: 70%

Build:
Build:
LAST BUILD BRANCH: release
DEFAULT BRANCH: master
Ran 04 Dec 2017 09:43AM UTC
Files 209
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Dec 2017 09:17AM UTC coverage: 32.324%. First build
MC_TEST_CHUNK=3

push

travis-ci

pypt
Join sentences and stories to temporary table instead of using IN()

If temporary table is empty (as seems to be the case with some Solr
queries which don't return any sentences), PostgreSQL decides to do a
sequential scan on "stories" table:

mediacloud=# explain SELECT sentence,
                            stories.language AS story_language
                     FROM story_sentences
                         INNER JOIN stories
                             ON story_sentences.stories_id = stories.stories_id
                     WHERE story_sentences_id IN (
                         SELECT id
                         FROM empty_temporary_table
                     );
                                                      QUERY PLAN
----------------------------------------------------------------------------------------------------------------------
 Merge Join  (cost=1349980901.31..1437936383.03 rows=4829242229 width=136)
   Merge Cond: (stories.stories_id = story_sentences.stories_id)
   ->  Sort  (cost=177068210.59..178802946.28 rows=693894273 width=6)
         Sort Key: stories.stories_id
         ->  Seq Scan on stories  (cost=0.00..69748298.73 rows=693894273 width=6)
   ->  Materialize  (cost=1172912448.35..1197058659.50 rows=4829242229 width=138)
         ->  Sort  (cost=1172912448.35..1184985553.93 rows=4829242229 width=138)
               Sort Key: story_sentences.stories_id
               ->  Nested Loop  (cost=38.96..587.75 rows=4829242229 width=138)
                     ->  HashAggregate  (cost=38.25..40.25 rows=200 width=8)
                           Group Key: xxx.id
                           ->  Seq Scan on xxx  (cost=0.00..32.60 rows=2260 width=8)
                     ->  Index Scan using story_sentences_pkey on story_sentences  (cost=0.71..2.73 rows=1 width=146)
                           Index Cond: (story_sentences_id = xxx.id)

References #233.

4773 of 14766 relevant lines covered (32.32%)

165.38 hits per line

Source Files on job 4453.3 (MC_TEST_CHUNK=3)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4453
  • Travis Job 4453.3
  • 5d49a1d0 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc