File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -55,3 +55,27 @@ FROM (
55
55
) as t
56
56
GROUP BY committer_email, month, repo_id
57
57
```
58
+
59
+ ## Create an index for columns on a table
60
+
61
+ You can create an index either on a specific column or on several columns:
62
+
63
+ ``` sql
64
+ CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash)
65
+
66
+ CREATE INDEX files_commit_path_blob_idx ON commit_files USING pilosa (commit_hash, file_path, blob_hash)
67
+ ```
68
+
69
+ ## Create an index for an expression on a table
70
+
71
+ Note that just one expression at a time is allowed to be indexed.
72
+
73
+ ``` sql
74
+ CREATE INDEX files_lang_idx ON files USING pilosa (language(file_path, blob_content))
75
+ ```
76
+
77
+ ## Drop a table's index
78
+
79
+ ``` sql
80
+ DROP INDEX files_lang_idx ON files
81
+ ```
You can’t perform that action at this time.
0 commit comments