Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Pavel Stehule
Hello 2012/12/4 Edson Richter : > Em 04/12/2012 18:49, Sergey Konoplev escreveu: > >> On Tue, Dec 4, 2012 at 5:57 AM, Edson Richter >> wrote: >>> >>> In this specific case, the full length (14) is mandatory... so seems >>> there >>> is no loss or gain. >>> Also, I see all varchar(...) created are

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Edson Richter
Em 04/12/2012 18:49, Sergey Konoplev escreveu: On Tue, Dec 4, 2012 at 5:57 AM, Edson Richter wrote: In this specific case, the full length (14) is mandatory... so seems there is no loss or gain. Also, I see all varchar(...) created are by default "storage = EXTENDED" (from "Pg Admin"), while ot

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Sergey Konoplev
On Tue, Dec 4, 2012 at 5:57 AM, Edson Richter wrote: > In this specific case, the full length (14) is mandatory... so seems there > is no loss or gain. > Also, I see all varchar(...) created are by default "storage = EXTENDED" > (from "Pg Admin"), while other datatypes (like numeric, smallint, int

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Gavin Flower
On 05/12/12 06:06, Edson Richter wrote: Em 04/12/2012 14:59, hari.fu...@gmail.com escreveu: Edson Richter writes: In this specific case, the full length (14) is mandatory... so seems there is no loss or gain. Also, I see all varchar(...) created are by default "storage = EXTENDED" (from "Pg A

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Edson Richter
Em 04/12/2012 14:59, hari.fu...@gmail.com escreveu: Edson Richter writes: In this specific case, the full length (14) is mandatory... so seems there is no loss or gain. Also, I see all varchar(...) created are by default "storage = EXTENDED" (from "Pg Admin"), while other datatypes (like numer

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread hari . fuchs
Edson Richter writes: > In this specific case, the full length (14) is mandatory... so seems > there is no loss or gain. > Also, I see all varchar(...) created are by default "storage = > EXTENDED" (from "Pg Admin"), while other datatypes (like numeric, > smallint, integer) are "storage = MAIN".

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Edson Richter
Em 04/12/2012 12:53, Kevin Grittner escreveu: Edson Richter wrote: Also, I see all varchar(...) created are by default "storage = EXTENDED" (from "Pg Admin"), while other datatypes (like numeric, smallint, integer) are "storage = MAIN". That's unlikely to matter on a 14 character value. Can

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Kevin Grittner
Edson Richter wrote: > Also, I see all varchar(...) created are by default "storage = > EXTENDED" (from "Pg Admin"), while other datatypes (like numeric, > smallint, integer) are "storage = MAIN". That's unlikely to matter on a 14 character value. > Can I have a gain using fixed length datatype

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Edson Richter
Em 04/12/2012 11:50, Pavel Stehule escreveu: Hello 2012/12/4 Edson Richter : I think I already know the answer (char(14)), but I would like to confirm: which is faster? In Brazil, company id has 14 digits (12 identifiers, 2 control digits). By today, application use varchar(14) for these, but

Re: [GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Bruce Momjian
On Tue, Dec 4, 2012 at 11:44:20AM -0200, Edson Richter wrote: > I think I already know the answer (char(14)), but I would like to > confirm: which is faster? > > In Brazil, company id has 14 digits (12 identifiers, 2 control > digits). By today, application use varchar(14) for these, but I > inte

[GENERAL] Which is faster: char(14) or varchar(14)

2012-12-04 Thread Edson Richter
I think I already know the answer (char(14)), but I would like to confirm: which is faster? In Brazil, company id has 14 digits (12 identifiers, 2 control digits). By today, application use varchar(14) for these, but I intend to optimize insert/update/delete and search, and I'm considering to