Re: Datatypes and performance
От | Andrew Sullivan |
---|---|
Тема | Re: Datatypes and performance |
Дата | |
Msg-id | 20030708043315.GB11964@libertyrms.info обсуждение исходный текст |
Ответ на | Re: Datatypes and performance ("Maksim Likharev" <mlikharev@aurigin.com>) |
Список | pgsql-general |
On Fri, Jul 04, 2003 at 02:22:39PM -0700, Maksim Likharev wrote: > Ok, what I see here tells me that text is slower then fixed len varchar, > due to stored in separate table ( but how else you can store long fields > ). No, sorry, I think I was unclear. varchar() is the same thing as text(); they'll be the same assuming the same length. If you go over the length for TOAST (1k? 2k? It's in the docs, I think, but I can't recall where) then you'll get it TOASTed. But that's true for most (all? I seem to recall so -- I don't have my local copy of the docs here) datatypes. One way to avoid running over that is to use varchar(n), for some small-enough value of n. But then you pay with overhead on every insert, because you have to check the length. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
В списке pgsql-general по дате отправления: