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

berkmancenter / mediacloud / 4453
54%
master: 70%

Build:
Build:
LAST BUILD BRANCH: release
DEFAULT BRANCH: master
Ran 04 Dec 2017 09:43AM UTC
Jobs 3
Files 214
Run time 12min
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

pending completion
4453

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.

8027 of 14911 relevant lines covered (53.83%)

977.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4453.1 (MC_TEST_CHUNK=1) 04 Dec 2017 09:47AM UTC 0
40.68
Travis Job 4453.1
3 4453.3 (MC_TEST_CHUNK=3) 04 Dec 2017 09:43AM UTC 0
32.32
Travis Job 4453.3
4 4453.4 (MC_TEST_CHUNK=4) 04 Dec 2017 09:56AM UTC 0
39.93
Travis Job 4453.4
Source Files on build 4453
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #4453
  • 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

© 2025 Coveralls, Inc