Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

loc-id-book-index.sql 587 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. --- #step Index instance ISBNs
  2. DROP MATERIALIZED VIEW IF EXISTS locid.instance_isbn CASCADE;
  3. CREATE MATERIALIZED VIEW locid.instance_isbn AS
  4. SELECT tt.subject_id AS subject_id,
  5. il.lit_value AS raw_isbn
  6. FROM locid.instance_triples tt
  7. JOIN locid.instance_literals il USING (subject_id)
  8. WHERE
  9. -- subject is of type ISBN
  10. tt.pred_id = locid.common_node('type')
  11. AND tt.object_id = locid.common_node('isbn')
  12. -- we have a literal value
  13. AND il.pred_id = locid.common_node('value');
  14. CREATE INDEX instance_isbn_node_idx ON locid.instance_isbn (subject_id);
  15. ANALYZE locid.instance_isbn;
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...