Commit 29d2815
Remove duplicate rows in MySQL query output
Previously we would expect duplicates rows from MySQL and then filter
them with _unique_floatingip_iterator. This means that we were
converting rows to ORM-mapped objects unnecessarily. This conversion is
very CPU intensive.
Instead, we can remove the duplicates as a part of the query which means
that only unique rows are returned and the number of conversions from
rows to ORM-mapped objects is reduced significantly. It also means that
the _unique_floatingip_iterator function is no longer needed.
Change-Id: I05136302f7b8abc0a985b91c993008595234ad6b
Signed-off-by: Adam Oswick <[email protected]>
(cherry picked from commit 8946684)
(cherry picked from commit f96691b)1 parent cf21a4d commit 29d2815
File tree
3 files changed
+52
-36
lines changed- neutron
- objects
- tests/unit
- db
- objects
3 files changed
+52
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
412 | | - | |
413 | 410 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
426 | 415 | | |
427 | 416 | | |
428 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 255 | | |
277 | 256 | | |
278 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
296 | 344 | | |
297 | 345 | | |
298 | 346 | | |
| |||
0 commit comments