Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise pathname of article detail page #4196

Closed
robertu7 opened this issue Feb 21, 2024 · 0 comments · Fixed by #4315
Closed

Revise pathname of article detail page #4196

robertu7 opened this issue Feb 21, 2024 · 0 comments · Fixed by #4315
Assignees

Comments

@robertu7
Copy link
Contributor

robertu7 commented Feb 21, 2024

Checklist


Story

tx0c pushed a commit to thematters/lambda-handlers that referenced this issue Apr 29, 2024
…articles

the migrate for thematters/matters-web#4196 ; not in matters-server is for
using the `UPDATE ... FROM UNNEST(...)` batch updating syntax much more efficient,
and which is not in knex-2.4 by matters-server yet;

```console
$ time PGIDLE_TIMEOUT=5 PGPASSWORD='xxx' \
    PG_CONNECTION_STRING='postgresql://[email protected]/database' \
    BATCH_SIZE=3200 \
    node --trace-warnings ./dist/bin/fill-short-hash.js
debug: query --:

      select b.oid, b.typarray
      from pg_catalog.pg_type a
      left join pg_catalog.pg_type b on b.oid = a.typelem
      where a.typcategory = 'A'
      group by b.oid, b.typarray
      order by b.oid

 { connection: 2, params: [], types: [] }
debug: query --:
SELECT (short_hash IS NOT NULL) short_hash, COUNT(*) ::int FROM public.article GROUP BY 1 ;
 { connection: 2, params: [], types: [] }
2024-04-29T07:07:19.530Z get stats: Result(1) [ { shortHash: true, count: 584509 } ]
debug: query --:
ALTER TABLE article ALTER COLUMN short_hash SET NOT NULL ;
 { connection: 2, params: [], types: [] }
[...]
```
tx0c pushed a commit to thematters/lambda-handlers that referenced this issue Apr 29, 2024
…articles

the migrate for thematters/matters-web#4196 ; not in matters-server is for
using the `UPDATE ... FROM UNNEST(...)` batch updating syntax much more efficient,
and which is not in knex-2.4 by matters-server yet;

```console
$ time PGIDLE_TIMEOUT=5 PGPASSWORD='xxx' \
    PG_CONNECTION_STRING='postgresql://[email protected]/database' \
    BATCH_SIZE=3200 \
    node --trace-warnings ./dist/bin/fill-short-hash.js
debug: query --:

      select b.oid, b.typarray
      from pg_catalog.pg_type a
      left join pg_catalog.pg_type b on b.oid = a.typelem
      where a.typcategory = 'A'
      group by b.oid, b.typarray
      order by b.oid

 { connection: 2, params: [], types: [] }
debug: query --:
SELECT (short_hash IS NOT NULL) short_hash, COUNT(*) ::int FROM public.article GROUP BY 1 ;
 { connection: 2, params: [], types: [] }
2024-04-29T07:07:19.530Z get stats: Result(1) [ { shortHash: true, count: 584509 } ]
debug: query --:
ALTER TABLE article ALTER COLUMN short_hash SET NOT NULL ;
 { connection: 2, params: [], types: [] }
[...]
```
@robertu7 robertu7 self-assigned this May 2, 2024
@robertu7 robertu7 linked a pull request May 2, 2024 that will close this issue
tx0c pushed a commit to thematters/lambda-handlers that referenced this issue May 22, 2024
…articles

the migrate for thematters/matters-web#4196 ; not in matters-server is for
using the `UPDATE ... FROM UNNEST(...)` batch updating syntax much more efficient,
and which is not in knex-2.4 by matters-server yet;

```console
$ time PGIDLE_TIMEOUT=5 PGPASSWORD='xxx' \
    PG_CONNECTION_STRING='postgresql://[email protected]/database' \
    BATCH_SIZE=3200 \
    node --trace-warnings ./dist/bin/fill-short-hash.js
debug: query --:

      select b.oid, b.typarray
      from pg_catalog.pg_type a
      left join pg_catalog.pg_type b on b.oid = a.typelem
      where a.typcategory = 'A'
      group by b.oid, b.typarray
      order by b.oid

 { connection: 2, params: [], types: [] }
debug: query --:
SELECT (short_hash IS NOT NULL) short_hash, COUNT(*) ::int FROM public.article GROUP BY 1 ;
 { connection: 2, params: [], types: [] }
2024-04-29T07:07:19.530Z get stats: Result(1) [ { shortHash: true, count: 584509 } ]
debug: query --:
ALTER TABLE article ALTER COLUMN short_hash SET NOT NULL ;
 { connection: 2, params: [], types: [] }
[...]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants