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
| explain analyze | |
| select id, doc from applications | |
| where | |
| (doc->>'status') = 'active' | |
| and (doc->>'credit_type') = 'org' | |
| and (doc->>'assigned_to') = 'user_999@test.com'; | |
| ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ | |
| │ QUERY PLAN │ | |
| ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ |
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
| # RUN mvn dependency:copy -Dartifact=org.duckdb:duckdb_jdbc:1.4.3.0 -DoutputDirectory=/duckdb | |
| # USER root | |
| # RUN ls -l /root/.m2/repository/org/duckdb/duckdb_jdbc/1.4.3.0 | |
| # RUN jar xf /root/.m2/repository/org/duckdb/duckdb_jdbc/1.4.3.0/duckdb_jdbc-1.4.3.0.jar libduckdb_java.so_linux_amd64 | |
| # RUN mkdir -p /var/task | |
| # RUN mv libduckdb_java.so_linux_amd64 /var/task/ |
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
| (deftype MM [-form] | |
| Object | |
| (toString [_this] | |
| (str -form))) | |
| (defmacro mm [form] | |
| `(new MM '~form)) | |
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 table app1 ( | |
| id uuid primary key, | |
| doc jsonb compression lz4 not null, | |
| created_at timestamptz not null default current_timestamp, | |
| updated_at timestamptz | |
| ); | |
| create table app2 ( | |
| id uuid primary key, | |
| doc jsonb compression lz4 not null, |
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
| (defn wrap-parallel [f n] | |
| (let [-sem (new java.util.concurrent.Semaphore (int n))] | |
| (fn [& args] | |
| (.acquire -sem) | |
| (try | |
| (apply f args) | |
| (finally | |
| (.release -sem)))))) | |
| (def wrapped |
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
| 0.1 | |
| 0.0(0011) | |
| 1.1001100110011001100110011001100110011 e-4 | |
| -4+127 = 123 | |
| 0 1111011 10011001100110011001100 11001100110011 | |
| 0 1111011 10011001100110011001101 | |
| 0.2 | |
| 0.(0011) |
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
| (ns consolidation.main | |
| (:gen-cla |
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 table users ( | |
| id serial primary key | |
| ); | |
| create table profiles ( | |
| id serial primary key, | |
| user_id integer not null references users(id) | |
| ); | |
| insert into users |
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 table goods ( | |
| id serial primary key, | |
| title text not null, | |
| created_at timestamptz not null default current_timestamp | |
| ); | |
| insert into goods(title) | |
| select | |
| format('good_%s', x) |
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 table tree( | |
| id text primary key, | |
| parent_id text null | |
| ); | |
| insert into tree values | |
| ('a', null), | |
| ('b', 'a'), | |
| ('c', 'a'), | |
| ('d', 'b'), |
NewerOlder