Commit b76ac69
committed
Lookup
While the `ExtendedAttributeIndex` is quite useful, it also introduces significant performance overhead. In the case of `UpdateTopic`, it represents 99% of the actual execution plan when it comes to just the `SELECT` statements. (Obviously, the `INSERT` statements are comparatively more expensive.)
This is a pretty steep price given that it's not really necessary here. When we're working with a single topic, and only need a single record, we can grab the last extended attribute directly from the `ExtendedAttributes` with only a couple of additional lines of code (namely a `TOP 1` and a `ORDER BY` clause).
This greatly improves the performance of `UpdateTopic`, and distributes the weight across other tasks.@PreviousExtendedAttributes from table directly1 parent afa1e9b commit b76ac69
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments