include | exclude | overhead | |
---|---|---|---|
1 | 3847 | 3965 | 2.98% |
2 | 4004 | 4123 | 2.89% |
3 | 3640 | 3744 | 2.78% |
4 | 4147 | 4267 | 2.81% |
5 | 4072 | 4175 | 2.47% |
6 | 3922 | 4020 | 2.44% |
7 | 3846 | 3962 | 2.93% |
8 | 4142 | 4244 | 2.40% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUERY PLAN | |
----------------------------------------------------------------------------------------------------------------------- | |
Aggregate (cost=4404.56..4404.57 rows=1 width=8) (actual time=65.949..65.950 rows=1 loops=1) | |
-> Seq Scan on s (cost=2137.12..4274.25 rows=52125 width=0) (actual time=39.009..64.162 rows=37156 loops=1) | |
Filter: (NOT (hashed SubPlan 1)) | |
Rows Removed by Filter: 62844 | |
SubPlan 1 | |
-> Seq Scan on t (cost=0.00..1876.50 rows=104250 width=4) (actual time=0.029..13.914 rows=100000 loops=1) | |
Planning Time: 5.089 ms | |
Execution Time: 66.337 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd "%~dp0" | |
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt | |
for /f %%i in ('findstr /i . hv.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i" | |
del hv.txt | |
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function fake_twid() | |
returns text | |
language plpgsql | |
as | |
$$ | |
declare | |
ret text; | |
check_num int; | |
check_index int[]; | |
digit int; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
str='postgresql://dbri@cxlitstaget01:5432/cxlimq_bm' | |
str='postgresql://dbir@cxlitstage01/cxlimq_bm' | |
str='postgresql://cxlitstage01:5432/cxlimq_bm' | |
regex='postgresql://(.*)@(.*):([0-9]*)/(.*)' | |
[[ $str =~ $regex ]] | |
if [ "$str" = "${BASH_REMATCH[0]}" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Source from: https://stackoverflow.com/questions/24178485/cast-or-extract-timestamp-from-v1-uuid-in-postgresql/61508178 | |
CREATE OR REPLACE FUNCTION uuid_timestamp(uuid UUID) RETURNS TIMESTAMPTZ AS $$ | |
DECLARE | |
bytes bytea; | |
BEGIN | |
bytes := uuid_send(uuid); | |
RETURN to_timestamp( | |
( | |
( | |
(get_byte(bytes, 0)::bigint << 24) | |
include | exclude | overhead | |
---|---|---|---|
1 | 3279 | 5010 | 34.55% |
2 | 3531 | 5375 | 34.31% |
3 | 3274 | 4998 | 34.49% |
4 | 3382 | 5168 | 34.56% |
5 | 3649 | 5559 | 34.36% |
6 | 3449 | 5253 | 34.34% |
7 | 3404 | 5180 | 34.29% |
8 | 3717 | 5661 | 34.34% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
repo1-path=/data/pgbackrest/backups/ | |
log-level-console=info | |
log-level-file=detail | |
log-path=/data/pgbackrest/log/ | |
start-fast=y | |
retention-diff=7 | |
retention-full=4 | |
compress-level=9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT s.schemaname, | |
s.indexname | |
FROM pg_index i | |
JOIN pg_indexes s | |
ON i.indexrelid = ( s.schemaname||'.'||s.indexname ) :: regclass :: oid | |
WHERE i.indisprimary = TRUE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://www.postgresql.org/docs/current/infoschema-columns.html | |
SELECT | |
cols.column_name, | |
( | |
SELECT | |
pg_catalog.col_description(c.oid, cols.ordinal_position::int) | |
FROM pg_catalog.pg_class c | |
WHERE | |
c.oid = ((cols.table_schema||'.'||cols.table_name)::regclass::oid) AND | |
c.relname = cols.table_name |