Update csv_export
parent
9d4bb721cf
commit
3c632ebe97
|
@ -2,4 +2,4 @@ go.work*
|
||||||
.env
|
.env
|
||||||
*.csv
|
*.csv
|
||||||
*.out
|
*.out
|
||||||
csv_export.gz
|
csv_export.tgz
|
2
Makefile
2
Makefile
|
@ -58,6 +58,6 @@ kill-csv-export:
|
||||||
@kill -9 `pgrep csv_export.sh`
|
@kill -9 `pgrep csv_export.sh`
|
||||||
|
|
||||||
csv-compress:
|
csv-compress:
|
||||||
@tar cvzf csv_export.tgz handles.csv post_counts.csv follows.csv like_counts.csv
|
@tar cvzf csv_export.tgz dids.csv handles.csv post_counts.csv follows.csv like_counts.csv
|
||||||
|
|
||||||
# ---------------------------- CSV Export ----------------------------
|
# ---------------------------- CSV Export ----------------------------
|
||||||
|
|
|
@ -52,7 +52,7 @@ echo "Done: $(ls -lh post_counts.csv)"
|
||||||
|
|
||||||
# ------------------------------ REPLIES ----------------------------------
|
# ------------------------------ REPLIES ----------------------------------
|
||||||
|
|
||||||
# ------------------------------ HANDLES ----------------------------------
|
# ------------------------------ DIDS + HANDLES ----------------------------------
|
||||||
|
|
||||||
dids_query="$(cat <<- EOF
|
dids_query="$(cat <<- EOF
|
||||||
insert into repos (did)
|
insert into repos (did)
|
||||||
|
|
|
@ -38,12 +38,11 @@ Get list blocks
|
||||||
non-partitioned (very slow)
|
non-partitioned (very slow)
|
||||||
|
|
||||||
```
|
```
|
||||||
select count(*) from (select distinct repo from records where collection in ('app.bsky.graph.listblock') and content['subject']::tex
|
select count(*) from (select distinct repo from records where collection in ('app.bsky.graph.listblock') and deleted=false and content['subject']::text like '"at://did:plc:bmjomljebcsuxolnygfgqtap/%');
|
||||||
t like '"at://did:plc:bmjomljebcsuxolnygfgqtap/%');
|
|
||||||
```
|
```
|
||||||
|
|
||||||
partitioned (slow)
|
partitioned (slow)
|
||||||
`select count(*) from (select distinct repo from records_listblock where content['subject']::text like '"at://did:plc:bmjomljebcsuxolnygfgqtap/%');`
|
`select count(*) from (select distinct repo from records_listblock where deleted=false and content['subject']::text like '"at://did:plc:bmjomljebcsuxolnygfgqtap/%');`
|
||||||
|
|
||||||
Count all records
|
Count all records
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue