forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit011b51c
committed
Marginal hacking to improve the speed of COPY OUT. I had found in a bit of
profiling that CopyAttributeOutText was taking an unreasonable fraction ofthe backend run time (like 66%!) on the following trivial test case:$ time psql -c "copy (select repeat('xyzzy',50) from generate_series(1,10000000)) to stdout" regression >/dev/nullThe time is all being spent on scanning the string for characters to beescaped, which most of the time there aren't any of. Some tweaking to takeas many tests as possible out of the inner loop reduced the runtime of thisexample by more than 10%. In a real-world case it wouldn't be as usefula speedup, but it still seems worth adding a few lines here.1 parent6775c01 commit011b51c
1 file changed
+74
-54
lines changedLines changed: 74 additions & 54 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
3075 | 3075 |
| |
3076 | 3076 |
| |
3077 | 3077 |
| |
3078 |
| - | |
| 3078 | + | |
3079 | 3079 |
| |
3080 | 3080 |
| |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
3081 | 3087 |
| |
3082 |
| - | |
3083 |
| - | |
| 3088 | + | |
3084 | 3089 |
| |
3085 |
| - | |
| 3090 | + | |
| 3091 | + | |
3086 | 3092 |
| |
3087 |
| - | |
3088 |
| - | |
3089 |
| - | |
3090 |
| - | |
3091 |
| - | |
3092 |
| - | |
3093 |
| - | |
3094 |
| - | |
3095 |
| - | |
3096 |
| - | |
3097 |
| - | |
3098 |
| - | |
3099 |
| - | |
3100 |
| - | |
3101 |
| - | |
3102 |
| - | |
3103 |
| - | |
3104 |
| - | |
3105 |
| - | |
3106 |
| - | |
3107 |
| - | |
3108 |
| - | |
3109 |
| - | |
3110 |
| - | |
3111 |
| - | |
3112 |
| - | |
| 3093 | + | |
| 3094 | + | |
3113 | 3095 |
| |
3114 |
| - | |
3115 |
| - | |
3116 |
| - | |
3117 |
| - | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
3118 | 3133 |
| |
3119 |
| - | |
3120 |
| - | |
3121 |
| - | |
3122 |
| - | |
3123 |
| - | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
3124 | 3140 |
| |
3125 |
| - | |
3126 |
| - | |
3127 |
| - | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
3128 | 3156 |
| |
3129 |
| - | |
3130 |
| - | |
3131 |
| - | |
3132 |
| - | |
3133 |
| - | |
3134 |
| - | |
3135 |
| - | |
3136 |
| - | |
3137 |
| - | |
3138 |
| - | |
3139 |
| - | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
3140 | 3160 |
| |
3141 | 3161 |
| |
3142 | 3162 |
| |
|
0 commit comments
Comments
(0)