Page MenuHomeSoftware Heritage
Paste P256

(An Untitled Masterwork)
ActivePublic

Authored by seirl on May 7 2018, 6:47 PM.
swh-dedup=# explain select count(chunk.length)
from chunk tablesample system(0.001)
left join chunked_content_chunk on chunk_id = chunk.id;
QUERY PLAN
--------------------------------------------------------------------------------------------------
Aggregate (cost=62753422.72..62753422.73 rows=1 width=8)
-> Hash Right Join (cost=509.64..57923049.12 rows=1932149440 width=4)
Hash Cond: ((chunked_content_chunk.chunk_id)::bytea = (chunk.id)::bytea)
-> Seq Scan on chunked_content_chunk (cost=0.00..33529225.40 rows=1932149440 width=21)
-> Hash (cost=338.73..338.73 rows=13673 width=25)
-> Sample Scan on chunk (cost=0.00..338.73 rows=13673 width=25)
Sampling: system ('0.001'::real)
(7 rows)
swh-dedup=# \d+ chunked_content_chunk
Table "public.chunked_content_chunk"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------------------+---------+-----------+----------+---------+----------+--------------+-------------
chunked_content_id | integer | | | | plain | |
chunk_id | sha1 | | | | extended | |
position | integer | | | | plain | |
Indexes:
"chunked_content_chunk_chunked_content_id_chunk_id_position_idx" UNIQUE, btree (chunked_content_id, chunk_id, "position")
"chunked_content_chunk_chunk_id_idx" btree (chunk_id)
"chunked_content_chunk_chunked_content_id_idx" btree (chunked_content_id)
Foreign-key constraints:
"chunked_content_chunk_chunk_id_fkey" FOREIGN KEY (chunk_id) REFERENCES chunk(id)
"chunked_content_chunk_chunked_content_id_fkey" FOREIGN KEY (chunked_content_id) REFERENCES chunked_content(id)

Event Timeline