| BML-S | Help Login

Last entries

    20240708.1742
  1. How to view Google API cloud storage files in browser - [s]

    https://console.cloud.google.com/storage/browser/chromiumos-image-archive/ferrochrome-public

  2. 20240626.1129
  3. postgres|postgresql > Delete duplicates but keep specific record - [s]

    BEGIN; WITH dupes AS ( SELECT d.repository_id, d.namespace, d.name, d.version, d.component_id, count(*) as a_c, ROW_NUMBER() OVER (PARTITION BY d.repository_id, d.namespace, d.name, d.version ORDER BY d.repository_id, d.namespace, d.name, d.version, count(*) DESC) AS rn FROM tmp_comp_dupes d LEFT JOIN maven2_asset a USING(component_id) GROUP BY d.repository_id, d.namespace, d.name, d.version, d.component_id ) DELETE FROM maven2_component c USING dupes WHERE c.component_id = dupes.component_id and dupes.rn > 1; -- If X records deleted COMMIT;

  4. 20240626.1049
  5. postgres > DELETE JOIN table - [s]

    BEGIN; DELETE FROM npm_asset a USING (select repository_id, path, min(asset_id) as keep_asset_id, count(*) as c from npm_asset group by 1, 2 having count(*) > 1) dupes WHERE a.repository_id = dupes.repository_id AND a.path = dupes.path and a.asset_id <> dupes.keep_asset_id; ROLLBACK;

  6. 20240625.0915
  7. postgres|postgresql > oldest xmin is far in the past - [s]

  8. 20240613.1518
  9. postgres|postgresql > Reindexing your database - [s]

    reindex (verbose) index insight_brain_ods.application_name_uk; reindex (verbose) database iq89959;

[s] public (5)