Datatypes and performance
От | Jay O'Connor |
---|---|
Тема | Datatypes and performance |
Дата | |
Msg-id | 20030704091041.C1100@altaica обсуждение исходный текст |
Ответы |
Re: Datatypes and performance
Re: Datatypes and performance Re: Datatypes and performance |
Список | pgsql-general |
Couple of questions on datat types and performance 1. varchar vs varchar(2) I created a database schema and based on the test data I had to work with, I couldn't really determine the max size of a lot of string fields so I just left a lot of fields as varchar A comment from a coworker was that this would cause a performance problem Based on the docs, they say that there's not performance difference between using varchar(n) and text. So will leaving my fields as unlimited varchar be a performance issue? Or should I try to narrow them down? My coworker has more experience with Oracle and MS-SQL than postgresql 2.varchar and int I was using a varchar as one field that's part of an index. Looking at the data, I realized I could just use an int instead. My assumption would be that an int would be faster to serach for thena varchar, so I converted the field to int. Is this a valid assumption? Thanks
В списке pgsql-general по дате отправления: