Update csv_export

main
mathan 2024-02-21 13:40:18 -08:00
parent 9d4bb721cf
commit 3c632ebe97
4 changed files with 5 additions and 6 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@ go.work*
.env .env
*.csv *.csv
*.out *.out
csv_export.gz csv_export.tgz

View File

@ -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 ----------------------------

View File

@ -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)

View File

@ -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