Re: Top -N Query performance issue and high CPU usage
| От | Adrian Klaver |
|---|---|
| Тема | Re: Top -N Query performance issue and high CPU usage |
| Дата | |
| Msg-id | 55d333e9-5172-4ece-9723-a64d6137acee@aklaver.com обсуждение |
| Ответ на | Re: Top -N Query performance issue and high CPU usage (Ron Johnson <ronljohnsonjr@gmail.com>) |
| Ответы |
Re: Top -N Query performance issue and high CPU usage
|
| Список | pgsql-general |
On 2/3/26 07:59, Ron Johnson wrote: > > > There is no VARCHAR or CHAR; there is only TEXT. Thus, this is 100% > expected and normal. What Ron is saying is that there are varchar and char types, but they boil down to text per: https://www.postgresql.org/docs/current/datatype-character.html "text is PostgreSQL's native string data type, in that most built-in functions operating on strings are declared to take or return text not character varying. For many purposes, character varying acts as though it were a domain over text." As to performance see: " Tip There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead. " > > -- > Death to <Redacted>, and butter sauce. > Don't boil me, I'm still alive. > <Redacted> lobster! -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: