Re: Selecting a constant question
От | Tom Lane |
---|---|
Тема | Re: Selecting a constant question |
Дата | |
Msg-id | 20388.1181590938@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Selecting a constant question ("Dann Corbit" <DCorbit@connx.com>) |
Ответы |
Re: Selecting a constant question
|
Список | pgsql-hackers |
"Dann Corbit" <DCorbit@connx.com> writes: > SELECT 1 FROM test.dbo.a_003 > gets about 60,000 records per second > SELECT '1' FROM test.dbo.a_003 > gets about 600 records per second. > The cause is that postgres describes the return column as "unknown" > length 65534 in the 2nd case. Postgres describes it in no such fashion --- unknown will always have a typmod of -1 which means "unspecified". Possibly you have some client code that knows much less than it thinks it does about the meanings of typmod values? The actual volume of data transmitted is going to be just about the same either way, so I'm not sure you've diagnosed the cause of slowdown correctly. Trying the example in psql seems to be about the same speed both ways, with if anything a slight advantage to select '1'. regards, tom lane
В списке pgsql-hackers по дате отправления: