forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit011d60c
committed
Speed up uuid_out() by not relying on a StringInfo
Since the size of the string representation of an uuid is fixed, thereis no benefit in using a StringInfo. This commit simplifies uuid_oud()to not rely on a StringInfo, where avoiding the overhead of the stringmanipulation makes the function substantially faster.A COPY TO on a relation with one UUID attribute can show up to a 40%speedup when the bottleneck is the COPY computation with uuid_out()showing up at the top of the profiles (numbered measure here, Laurenzhas mentioned something closer to 20% faster runtimes), for example whenthe data is fully in shared buffers or the OS cache.Author: Laurenz AlbeReviewed-by: Andres Freund, Michael PaquierDescription:https://postgr.es/m/679d5455cbbb0af667ccb753da51a475bae1eaed.camel@cybertec.at1 parent943f7ae commit011d60c
1 file changed
+10
-6
lines changedLines changed: 10 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
| 57 | + | |
57 | 58 |
| |
58 | 59 |
| |
59 |
| - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 |
| |
61 | 64 |
| |
62 | 65 |
| |
| |||
68 | 71 |
| |
69 | 72 |
| |
70 | 73 |
| |
71 |
| - | |
| 74 | + | |
72 | 75 |
| |
73 | 76 |
| |
74 | 77 |
| |
75 | 78 |
| |
76 |
| - | |
77 |
| - | |
| 79 | + | |
| 80 | + | |
78 | 81 |
| |
| 82 | + | |
79 | 83 |
| |
80 |
| - | |
| 84 | + | |
81 | 85 |
| |
82 | 86 |
| |
83 | 87 |
| |
|
0 commit comments
Comments
(0)