Re: [HACKERS] Postgres Speed or lack thereof
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Postgres Speed or lack thereof |
Дата | |
Msg-id | 199901181234.HAA00107@candle.pha.pa.us обсуждение исходный текст |
Ответ на | RE: [HACKERS] Postgres Speed or lack thereof (Magnus Hagander <mha@sollentuna.net>) |
Список | pgsql-hackers |
> Could be because of that. I noticed that the backend calls pq_getchar() a > _lot_ of times, looping for reading a single character. It did that before > too. The difference was that pq_getchar() called fgetc() then, and calls > recv() now. > I don't know, maybe recv() is more expensive than fgetc()? But I really > can't see any reason it shuold be called more often now than before. > An interesting fact is that pq_getchar() doesn't show up at all. Could be > because it's fast, but still executed many times, right? Or it could be that > the 'inner loops' in pq_getchar(), pq_peekchar(), or pqGetNBytes() don't > work as expected. On my system (Linux 2.2), I only get one recv() call for > each entry into these functions - as it should be - might it be different on > yours? It is very possible that fgetc() is a macro on your platform. See /usr/include/stdio.h. If so, it has no function call overhead. On BSD/OS, it used to be a macro, but now with threads, it is not. They have a macro version, but is under a different name. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: