Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
От | Etsuro Fujita |
---|---|
Тема | Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan |
Дата | |
Msg-id | 55E543A0.8060804@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan (David Rowley <david.rowley@2ndquadrant.com>) |
Список | pgsql-hackers |
On 2015/08/30 13:06, David Rowley wrote: > It's likely not worth changing if there's cases when it'll be slower, > but curiosity got the better of me and I wondered how extreme a case it > would take to actually see a slowdown, and per my benchmark results the > first used column would have to be about attnum 500. > I used the attached to benchmark. has_system_columns is the current > method, has_system_columns2 has my changes. Lines are prefixed by the > position where the first (and only) attnum appears in the bitmap set. > 1 has_system_columns complete in 1.196000 > 1 has_system_columns2 complete in 0.170000 > 2 has_system_columns complete in 1.198000 > 2 has_system_columns2 complete in 0.167000 > 4 has_system_columns complete in 1.197000 > 4 has_system_columns2 complete in 0.170000 > 8 has_system_columns complete in 1.206000 > 8 has_system_columns2 complete in 0.203000 > 16 has_system_columns complete in 1.202000 > 16 has_system_columns2 complete in 0.237000 > 32 has_system_columns complete in 1.206000 > 32 has_system_columns2 complete in 0.232000 > 64 has_system_columns complete in 1.207000 > 64 has_system_columns2 complete in 0.268000 > 128 has_system_columns complete in 1.205000 > 128 has_system_columns2 complete in 0.368000 > 256 has_system_columns complete in 1.203000 > 256 has_system_columns2 complete in 0.780000 > 512 has_system_columns complete in 1.202000 > 512 has_system_columns2 complete in 1.302000 > 1024 has_system_columns complete in 1.199000 > 1024 has_system_columns2 complete in 3.539000 > So, for what it's worth, could be 6 times faster for an "average" sized > table, but hey, we're talking nanoseconds anyway... That's interesting. But ISTM that that needs more discussion, so I'd like to leave the method as-is at least for now. Thanks for the experiment! Best regards, Etsuro Fujita
В списке pgsql-hackers по дате отправления: