added query plans

This commit is contained in:
Artemis 2025-01-26 00:07:08 +01:00
parent 9e5987872c
commit 60b0789370
17 changed files with 752 additions and 0 deletions

View file

@ -0,0 +1,131 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\t\t\tselect * from doll_profiles where (id = $1 or microchip_id = $2) and archived_at is null\n\t\t\t",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "microchip_id",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "pronoun_subject",
"type_info": "Varchar"
},
{
"ordinal": 6,
"name": "pronoun_object",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "pronoun_possessive",
"type_info": "Varchar"
},
{
"ordinal": 8,
"name": "handler_name",
"type_info": "Varchar"
},
{
"ordinal": 9,
"name": "handler_link",
"type_info": "Varchar"
},
{
"ordinal": 10,
"name": "kind",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "breed",
"type_info": "Varchar"
},
{
"ordinal": 12,
"name": "behaviour",
"type_info": "Varchar"
},
{
"ordinal": 13,
"name": "description",
"type_info": "Varchar"
},
{
"ordinal": 14,
"name": "chassis_type",
"type_info": "Varchar"
},
{
"ordinal": 15,
"name": "chassis_id",
"type_info": "Varchar"
},
{
"ordinal": 16,
"name": "chassis_color",
"type_info": "Varchar"
},
{
"ordinal": 17,
"name": "bound_to_id",
"type_info": "Uuid"
},
{
"ordinal": 18,
"name": "archived_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int4",
"Text"
]
},
"nullable": [
false,
true,
false,
true,
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
false,
true
]
},
"hash": "03800471afd396ebcabb3dfd9fb7523989c0d0af621aeea8c7480dede8ceef1b"
}

View file

@ -0,0 +1,24 @@
{
"db_name": "PostgreSQL",
"query": "insert into users (username, password, email) values ($1, $2, $3) returning id",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
}
],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar"
]
},
"nullable": [
false
]
},
"hash": "04b03692c696a8fa61f75ccc3402b3446b0983c811259286e2b6c02fd30d93d9"
}

View file

@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "select id from users where username = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "0f6145094007fdced148d362f35ed52145f8fe27520c399f2d05b4b4604d0dae"
}

View file

@ -0,0 +1,130 @@
{
"db_name": "PostgreSQL",
"query": "select * from doll_profiles where bound_to_id = $1 and archived_at is null",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "microchip_id",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "pronoun_subject",
"type_info": "Varchar"
},
{
"ordinal": 6,
"name": "pronoun_object",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "pronoun_possessive",
"type_info": "Varchar"
},
{
"ordinal": 8,
"name": "handler_name",
"type_info": "Varchar"
},
{
"ordinal": 9,
"name": "handler_link",
"type_info": "Varchar"
},
{
"ordinal": 10,
"name": "kind",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "breed",
"type_info": "Varchar"
},
{
"ordinal": 12,
"name": "behaviour",
"type_info": "Varchar"
},
{
"ordinal": 13,
"name": "description",
"type_info": "Varchar"
},
{
"ordinal": 14,
"name": "chassis_type",
"type_info": "Varchar"
},
{
"ordinal": 15,
"name": "chassis_id",
"type_info": "Varchar"
},
{
"ordinal": 16,
"name": "chassis_color",
"type_info": "Varchar"
},
{
"ordinal": 17,
"name": "bound_to_id",
"type_info": "Uuid"
},
{
"ordinal": 18,
"name": "archived_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
true,
false,
true,
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
false,
true
]
},
"hash": "164d77651f1f1b9ec7a28343db098305486e025bc4a5e71279a62da807ecea79"
}

View file

@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "select id from doll_profiles where bound_to_id = $1 and archived_at is not null",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false
]
},
"hash": "284da4d5365ee11bdbbbfbb8ddccf77d2627d3e8dd34f6a1e5f3d29cf3cf66ed"
}

View file

@ -0,0 +1,16 @@
{
"db_name": "PostgreSQL",
"query": "update users set username = $1, email = $2 where id = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Uuid"
]
},
"nullable": []
},
"hash": "39cac080fb07c4655cb3235245996bb182e4ff825be9af54f55bd94922fe8650"
}

View file

@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "select id from doll_profiles where id = $1 or microchip_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Int4",
"Text"
]
},
"nullable": [
false
]
},
"hash": "44834b8a95718d0ae8ffc96e93469c6e0b4e6ca1160f7ada141f9515a6921ec9"
}

View file

@ -0,0 +1,58 @@
{
"db_name": "PostgreSQL",
"query": "select * from users where id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 2,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "username",
"type_info": "Varchar"
},
{
"ordinal": 4,
"name": "password",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "enabled",
"type_info": "Bool"
},
{
"ordinal": 6,
"name": "email",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
true,
false,
false,
false,
true
]
},
"hash": "7609165d94c8f1bea9d535b9b7ad727fd06592973d7f83017292d41acb203be6"
}

View file

@ -0,0 +1,58 @@
{
"db_name": "PostgreSQL",
"query": "select * from users where username = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 2,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "username",
"type_info": "Varchar"
},
{
"ordinal": 4,
"name": "password",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "enabled",
"type_info": "Bool"
},
{
"ordinal": 6,
"name": "email",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
false,
true,
false,
false,
false,
true
]
},
"hash": "9d00617966f8aeebb08de6ad981dc3b8697c65f0b23cea4684f525732d8f6706"
}

View file

@ -0,0 +1,28 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\t\tupdate doll_profiles\n\t\t\tset microchip_id = $1,\n\t\t\tname = $2,\n\t\t\tpronoun_subject = $3,\n\t\t\tpronoun_object = $4,\n\t\t\tpronoun_possessive = $5,\n\t\t\thandler_name = $6,\n\t\t\thandler_link = $7,\n\t\t\tkind = $8,\n\t\t\tbreed = $9,\n\t\t\tbehaviour = $10,\n\t\t\tdescription = $11,\n\t\t\tchassis_type = $12,\n\t\t\tchassis_id = $13,\n\t\t\tchassis_color = $14,\n\t\t\tarchived_at = null,\n\t\t\tupdated_at = current_timestamp\n\t\t\twhere id = $15\n\t\t",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Int4"
]
},
"nullable": []
},
"hash": "9d71874889dfca1db897f09f772c14898372fd6561c7f6011f3f04a279e24bdf"
}

View file

@ -0,0 +1,29 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\t\tinsert into doll_profiles\n\t\t\t(id, microchip_id, name, pronoun_subject, pronoun_object, pronoun_possessive, handler_name, handler_link, kind, breed, behaviour, description, chassis_type, chassis_id, chassis_color, bound_to_id)\n\t\t\tvalues ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)\n\t\t",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int4",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Uuid"
]
},
"nullable": []
},
"hash": "a3d6e4ddfa10505e777ccb7a184e17a57c3620cd56ae3858f33db020c6be42f2"
}

View file

@ -0,0 +1,131 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\t\t\tselect * from doll_profiles where (id = $1 or microchip_id = $2)\n\t\t\t",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "microchip_id",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "pronoun_subject",
"type_info": "Varchar"
},
{
"ordinal": 6,
"name": "pronoun_object",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "pronoun_possessive",
"type_info": "Varchar"
},
{
"ordinal": 8,
"name": "handler_name",
"type_info": "Varchar"
},
{
"ordinal": 9,
"name": "handler_link",
"type_info": "Varchar"
},
{
"ordinal": 10,
"name": "kind",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "breed",
"type_info": "Varchar"
},
{
"ordinal": 12,
"name": "behaviour",
"type_info": "Varchar"
},
{
"ordinal": 13,
"name": "description",
"type_info": "Varchar"
},
{
"ordinal": 14,
"name": "chassis_type",
"type_info": "Varchar"
},
{
"ordinal": 15,
"name": "chassis_id",
"type_info": "Varchar"
},
{
"ordinal": 16,
"name": "chassis_color",
"type_info": "Varchar"
},
{
"ordinal": 17,
"name": "bound_to_id",
"type_info": "Uuid"
},
{
"ordinal": 18,
"name": "archived_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int4",
"Text"
]
},
"nullable": [
false,
true,
false,
true,
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
false,
true
]
},
"hash": "b032b09996d538f01c221d2d2b09563c1a0a9164416b3f5c08de54c2f5b19fa4"
}

View file

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "delete from users where id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "b0539523e23773e7d01ac00be741e59c56a0dbd6a1cb436c5a92e53062505ab2"
}

View file

@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "select id from doll_profiles where id in (select * from unnest($1::int[]))",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Int4Array"
]
},
"nullable": [
false
]
},
"hash": "c9b560a9a7fc24b3501480fc5eb30804813cd08c619c43f345a1c1197d5d70f8"
}

View file

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\t\tupdate doll_profiles\n\t\t\tset microchip_id = null,\n\t\t\tname = '',\n\t\t\tpronoun_subject = '',\n\t\t\tpronoun_object = '',\n\t\t\tpronoun_possessive = '',\n\t\t\thandler_name = '',\n\t\t\thandler_link = null,\n\t\t\tkind = null,\n\t\t\tbreed = null,\n\t\t\tbehaviour = null,\n\t\t\tdescription = null,\n\t\t\tchassis_type = null,\n\t\t\tchassis_id = null,\n\t\t\tchassis_color = null,\n\t\t\tupdated_at = current_timestamp,\n\t\t\tarchived_at = current_timestamp\n\t\t\twhere id = $1\n\t\t",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int4"
]
},
"nullable": []
},
"hash": "cff8deaa5dcc8b79c137cb968454e0404efe284597436a710a3377ca46a5f165"
}

View file

@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "update doll_profiles set bound_to_id = $1 where archived_at is not null and bound_to_id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid",
"Uuid"
]
},
"nullable": []
},
"hash": "e63b1d8ea28a511779bea730690212e12f113718507999c0b177b2aa15650a5e"
}

View file

@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "update users set password = $1 where id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Uuid"
]
},
"nullable": []
},
"hash": "f1bb0a0a7a3cb0c80572a6310c234a1da0d455ee712bde8ab468f52d61bddb1a"
}