Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124299
D7056.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7056.diff
View Options
diff --git a/swh/provenance/sql/40-funcs.sql b/swh/provenance/sql/40-funcs.sql
--- a/swh/provenance/sql/40-funcs.sql
+++ b/swh/provenance/sql/40-funcs.sql
@@ -100,7 +100,7 @@
begin
if src_table in ('content'::regclass, 'directory'::regclass) then
select_fields := 'D.id, L.id';
- join_location := 'inner join location as L on (L.path = V.path)';
+ join_location := 'inner join location as L on digest(L.path, ''sha1'') = digest(V.path, ''sha1'')';
else
select_fields := 'D.id';
join_location := '';
@@ -419,7 +419,7 @@
begin
if src_table in ('content'::regclass, 'directory'::regclass) then
select_fields := 'array_agg(D.id), array_agg(L.id)';
- join_location := 'inner join location as L on (L.path = V.path)';
+ join_location := 'inner join location as L on digest(L.path, ''sha1'') = digest(V.path, ''sha1'')';
group_entries := 'group by S.id';
on_conflict := format('
(%s) do update
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 5:36 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218684
Attached To
D7056: Use the new digest(path, 'sha1') index on location for joins
Event Timeline
Log In to Comment