This file contains 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
-- SQL implementation of https://github.com/gunnarmorling/1brc | |
-- | |
-- get the basic feed data as insert statements in weatherstations.sql | |
-- | |
/* run in shell to build the 400 lines feed data that was hardcoded in CreateMeasurements.java : | |
curl -s https://raw.githubusercontent.com/gunnarmorling/1brc/main/src/main/java/dev/morling/onebrc/CreateMeasurements.java | awk ' | |
# Oracle Database # BEGIN{print "begin"} END{ print "end;" ; print "/" } |
This file contains 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
<table> | |
<tbody><tr> | |
<td> | |
<strong>MVCC Isolation level</strong> | |
</td> | |
<td> | |
<strong>Serializable Snapshot Isolation</strong> | |
</td> | |
<td> | |
<strong>Snapshot Isolation</strong> |
This file contains 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
-- load names | |
\! wget -cO/var/tmp/baby-names.csv "https://github.com/hadley/data-baby-names/blob/master/baby-names.csv?raw=true" | |
drop table if exists baby_names; | |
create table baby_names ( year int , name text, percent float, sex text, primary key (name,year, sex)); | |
\copy baby_names from '/var/tmp/baby-names.csv' with ( skip 1, format csv ); | |
-- joins scale | |
drop table if exists users,messages cascade; | |
create table users ( | |
primary key (user_id) |
This file contains 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
export PATH=$PATH:$ORACLE_HOME/python/bin | |
pip install html2text | |
for f in $(grep -l ' wrapped *$' $(find $ORACLE_HOME -name "*.plb")) | |
do | |
curl -s -F "file=@$f" -F "ShowLineNumbers=false" -F "UnwrapFile=Unwrap File" https://www.codecrete.net/UnwrapIt/ | | |
html2text | awk ' | |
/Unwrap More Code/{p="Y";next} | |
/Bleichenbacher/{print "--",$0;next} | |
p=="Y"{gsub(/ʼ/,qq);print} | |
' qq="'" > ${f}.unwrapped && wc ${f}.unwrapped |
This file contains 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
/* Load from psql: | |
\! curl -s https://gist.githubusercontent.com/FranckPachot/ec2b586d18965a4571a544c2b862e6a7/raw/fef5faa450ab25949b6bd35f7af9dbc48e89c068/yb_emp_dept.sql > yb_emp_dept.sql | |
\i yb_emp_dept.sql | |
*/ | |
drop table if exists emp; | |
drop table if exists dept cascade; | |
CREATE TABLE IF NOT EXISTS dept ( |
This file contains 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
# take the following from the public image: /home/yugabyte /etc/yum.repos.d/CentOS.repo /etc/yum.repos.d/almalinux8.repo /usr/bin/NOTICE.txt /usr/bin/azcopy /usr/local/gsutil | |
FROM yugabytedb/yugabyte:2.17.1.0-b439 as public_image | |
# remove those that are re-created later | |
RUN rm -rf /home/yugabyte/{master,tserver} | |
FROM almalinux:8 | |
ENV RELEASE=4 | |
ENV USER=root |
This file contains 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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": { | |
"type": "grafana", | |
"uid": "-- Grafana --" | |
}, | |
"enable": true, |
This file contains 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
/* | |
cd /var/tmp | |
wget -c https://netix.dl.sourceforge.net/project/hibernate/hibernate-orm/5.6.0.Final/hibernate-release-5.6.0.Final.zip | |
unzip -qo hibernate-release-5.6.0.Final.zip | |
for i in hibernate-release-5.6.0.Final/lib/required/*.jar | |
do | |
CLASSPATH="${CLASSPATH}:$PWD/$i" | |
done | |
wget -c https://jdbc.postgresql.org/download/postgresql-42.3.0.jar | |
export CLASSPATH=.:$ORACLE_HOME/jdbc/lib/ojdbc8.jar:$PWD/postgresql-42.3.0.jar:$CLASSPATH |
This file contains 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
cat > Dockerfile <<'DOCKERFILE' | |
FROM yugabytedb/yugabyte:latest | |
ADD start.sh . | |
RUN chmod a+x start.sh | |
ENV RF=3 | |
CMD ./start.sh | |
DOCKERFILE | |
cat > start.sh <<'START' |
This file contains 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
<html lang="en"><head><title>AWR Report for DB: FEIO1POD, Inst: feio1pod2, Snaps: 2802-2803</title> | |
<style type="text/css"> | |
body.awr {font:bold 10pt Arial,Helvetica,Geneva,sans-serif;color:black; background:White;} | |
pre.awr {font:8pt Courier;color:black; background:White;} | |
pre_sqltext.awr {white-space: pre-wrap;} | |
h1.awr {font:bold 20pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;border-bottom:1px solid #cccc99;margin-top:0pt; margin-bottom:0pt;padding:0px 0px 0px 0px;} | |
h2.awr {font:bold 18pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;} | |
h3.awr {font:bold 16pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:White;margin-top:4pt; margin-bottom:0pt;} | |
li.awr {font: 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:White;} |
NewerOlder