Commit a58e3a5
feat(vet): Add default query parameters for explain queries (#2543)
* feat(vet): add default query parameters for vet explain with MySQL
* feat(vet): Add default parameter values for PostgreSQL
Before this change, all parameters to a query would be set to NULL when explaining the query. For both PostgreSQL and MySQL, this caused the explain output to either error or return unhelpful results.
For MySQL, these NULL parameters would cause "Impossible WHERE clause" errors. For PostgreSQL, the EXPLAIN output would return plans without indexes.
The default parameters aren't complete and won't cover all cases. We're working on a fallback mechanism that would allow you to specify the explain parameters values directly. Stay tuned!
---------
Co-authored-by: Andrew Benton <[email protected]>1 parent 3b48228 commit a58e3a5
File tree
8 files changed
+1093
-4
lines changed- docs/howto
- internal
- cmd
- endtoend/testdata/vet_explain/mysql
- db
8 files changed
+1093
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | | - | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
173 | 299 | | |
174 | 300 | | |
175 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
176 | 305 | | |
177 | 306 | | |
178 | 307 | | |
179 | 308 | | |
180 | 309 | | |
181 | 310 | | |
182 | | - | |
| 311 | + | |
183 | 312 | | |
184 | 313 | | |
185 | 314 | | |
| |||
210 | 339 | | |
211 | 340 | | |
212 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
213 | 345 | | |
214 | 346 | | |
215 | 347 | | |
216 | 348 | | |
217 | 349 | | |
218 | 350 | | |
219 | | - | |
| 351 | + | |
220 | 352 | | |
221 | 353 | | |
222 | 354 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments