All pastes #230587 Raw Edit

Divers

public sql v1 · immutable
#230587 ·published 2006-10-31 10:10 UTC
rendered paste body
explain analyze SELECT                  _article.id                 AS _article_id,                 _article.parent_id            AS _article_parent_id,                 _article.path                AS _article_path,                 _article.data                AS _article_data,                 _article.date_creation        AS _article_date_creation,                 _article.date_publishing    AS _article_date_publishing,                 _article.date_modification    AS _article_date_modification,                 _article.reference            AS _article_reference,                 _article.title                AS _article_title,                _blog.id                     AS _blog_id,                 _blog.parent_id                AS _blog_parent_id,                 _blog.path                    AS _blog_path,                 _blog.data                    AS _blog_data,                 _blog.date_creation            AS _blog_date_creation,                 _blog.date_publishing        AS _blog_date_publishing,                 _blog.date_modification        AS _blog_date_modification,                 _blog.reference                AS _blog_reference,                 _blog.name                    AS _blog_name,                _blog.main_host                AS _blog_main_host,                _blog.base_host                AS _blog_base_host,                _blog.description            AS _blog_description            FROM      _article            INNER JOIN _blog                    ON _article.path <@ _blog.path            WHERE _article.reference = 760656 OR _article.reference = 3120003 OR _article.reference = 970246;                                                                                         QUERY PLAN                                                                   ----------------------------------------------------------------------------------------------------------------------------------------------- Nested Loop  (cost=280.56..29867503.15 rows=10305058 width=376) (actual time=0.672..0.790 rows=2 loops=1)   ->  Bitmap Heap Scan on _article  (cost=274.73..99088.81 rows=43134 width=140) (actual time=0.178..0.193 rows=2 loops=1)         Recheck Cond: ((reference = 760656) OR (reference = 3120003) OR (reference = 970246))         ->  BitmapOr  (cost=274.73..274.73 rows=43350 width=0) (actual time=0.150..0.150 rows=0 loops=1)               ->  Bitmap Index Scan on idx_article_reference  (cost=0.00..91.58 rows=14450 width=0) (actual time=0.086..0.086 rows=1 loops=1)                     Index Cond: (reference = 760656)               ->  Bitmap Index Scan on idx_article_reference  (cost=0.00..91.58 rows=14450 width=0) (actual time=0.026..0.026 rows=0 loops=1)                     Index Cond: (reference = 3120003)               ->  Bitmap Index Scan on idx_article_reference  (cost=0.00..91.58 rows=14450 width=0) (actual time=0.030..0.030 rows=1 loops=1)                     Index Cond: (reference = 970246)   ->  Bitmap Heap Scan on _blog  (cost=5.84..687.15 rows=239 width=236) (actual time=0.284..0.285 rows=1 loops=2)         Recheck Cond: ("outer".path <@ _blog.path)         ->  Bitmap Index Scan on gist_idx_blog_path  (cost=0.00..5.84 rows=239 width=0) (actual time=0.270..0.270 rows=1 loops=2)               Index Cond: ("outer".path <@ _blog.path) Total runtime: 0.877 ms(15 rows)-----------------------------explain analyze SELECT                  _article.id                 AS _article_id,                 _article.parent_id            AS _article_parent_id,                 _article.path                AS _article_path,                 _article.data                AS _article_data,                 _article.date_creation        AS _article_date_creation,                 _article.date_publishing    AS _article_date_publishing,                 _article.date_modification    AS _article_date_modification,                 _article.reference            AS _article_reference,                 _article.title                AS _article_title,                _blog.id                     AS _blog_id,                 _blog.parent_id                AS _blog_parent_id,                 _blog.path                    AS _blog_path,                 _blog.data                    AS _blog_data,                 _blog.date_creation            AS _blog_date_creation,                 _blog.date_publishing        AS _blog_date_publishing,                 _blog.date_modification        AS _blog_date_modification,                 _blog.reference                AS _blog_reference,                 _blog.name                    AS _blog_name,                _blog.main_host                AS _blog_main_host,                _blog.base_host                AS _blog_base_host,                _blog.description            AS _blog_description            FROM      _article            INNER JOIN _blog                    ON _article.path <@ _blog.path            WHERE _article.reference = 760656 OR _article.reference = 3120003 OR _article.reference = 970246 OR _article.reference = 1694027;                                                            QUERY PLAN                                                             ----------------------------------------------------------------------------------------------------------------------------------- Nested Loop  (cost=5.84..40075017.69 rows=13705674 width=376) (actual time=625.890..41465.791 rows=3 loops=1)   ->  Seq Scan on _article  (cost=0.00..483178.44 rows=57368 width=140) (actual time=625.569..41465.063 rows=3 loops=1)         Filter: ((reference = 760656) OR (reference = 3120003) OR (reference = 970246) OR (reference = 1694027))   ->  Bitmap Heap Scan on _blog  (cost=5.84..687.15 rows=239 width=236) (actual time=0.217..0.219 rows=1 loops=3)         Recheck Cond: ("outer".path <@ _blog.path)         ->  Bitmap Index Scan on gist_idx_blog_path  (cost=0.00..5.84 rows=239 width=0) (actual time=0.203..0.203 rows=1 loops=3)               Index Cond: ("outer".path <@ _blog.path) Total runtime: 41465.885 ms(8 rows)