mirror of
https://github.com/sandronator/finetuning_aufgabe4.git
synced 2026-09-10 07:56:21 +02:00
first commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,53 @@
|
||||
queries_maria = {
|
||||
"no_index": {
|
||||
"query_1": """
|
||||
ANALYZE SELECT name, title
|
||||
FROM Auth IGNORE INDEX (idx_auth_pubid), Publ IGNORE INDEX(idx_publ_pubid)
|
||||
WHERE Auth.pubID = Publ.pubID;
|
||||
""",
|
||||
"query_2": """
|
||||
ANALYZE SELECT title
|
||||
FROM Auth IGNORE INDEX (idx_auth_pubid), Publ IGNORE INDEX(idx_publ_pubid)
|
||||
WHERE Auth.pubID = Publ.pubID AND Auth.name = 'Divesh Srivastava';
|
||||
""",
|
||||
},
|
||||
"with_index": {
|
||||
"query_1": """
|
||||
ANALYZE SELECT name, title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID;
|
||||
""",
|
||||
"query_2": """
|
||||
ANALYZE SELECT title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID AND Auth.name = 'Divesh Srivastava';
|
||||
""",
|
||||
},
|
||||
}
|
||||
|
||||
queries_postgres = {
|
||||
"no_index": {
|
||||
"query_1": """
|
||||
EXPLAIN ANALYZE SELECT name, title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID;
|
||||
""",
|
||||
"query_2": """
|
||||
EXPLAIN ANALYZE SELECT title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID AND Auth.name = 'Divesh Srivastava';
|
||||
""",
|
||||
},
|
||||
"with_index": {
|
||||
"query_1": """
|
||||
EXPLAIN ANALYZE SELECT name, title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID;
|
||||
""",
|
||||
"query_2": """
|
||||
EXPLAIN ANALYZE SELECT title
|
||||
FROM Auth, Publ
|
||||
WHERE Auth.pubID = Publ.pubID AND Auth.name = 'Divesh Srivastava';
|
||||
""",
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
resolve = {
|
||||
"postgresql": {
|
||||
"disable": ["SET enable_nestloop = off", "SET enable_mergejoin = off"],
|
||||
"reset": ["RESET enable_nestloop", "RESET enable_mergejoin"],
|
||||
},
|
||||
"mariadb": {
|
||||
"disable": ["SET optimizer_switch='join_cache_hashed=on'", "SET join_cache_level=8"],
|
||||
"reset": ["SET optimizer_switch=DEFAULT", "SET join_cache_level=DEFAULT"],
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# nestedLoopResolver.py
|
||||
resolve = {
|
||||
"postgresql": {
|
||||
"disable": ["SET enable_hashjoin = off", "SET enable_mergejoin = off"],
|
||||
"reset": ["RESET enable_hashjoin", "RESET enable_mergejoin"],
|
||||
},
|
||||
"mariadb": {
|
||||
"disable": ["SET optimizer_switch='block_nested_loop=off'"],
|
||||
"reset": ["SET optimizer_switch=DEFAULT"],
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# sortMergeResolver.py
|
||||
resolve = {
|
||||
"postgresql": {
|
||||
"disable": ["SET enable_hashjoin = off", "SET enable_nestloop = off"],
|
||||
"reset": ["RESET enable_hashjoin", "RESET enable_nestloop"],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user