Re: [SQL] indexing on char vs varchar

2002-10-02 Thread Beth Gatewood
d; 'Bruce Momjian' > Cc: [EMAIL PROTECTED] > Subject: Re: [SQL] indexing on char vs varchar > > > Beth, > > Oh, and you should take this sort of question to the new > performance list: > [EMAIL PROTECTED] > > -- > -Josh Berkus > Aglio Database

Re: [SQL] indexing on char vs varchar

2002-10-02 Thread Josh Berkus
Beth, Oh, and you should take this sort of question to the new performance list: [EMAIL PROTECTED] -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] indexing on char vs varchar

2002-10-02 Thread Josh Berkus
Beth, > SorryI don't understand. The length is at the front of what? In some RDBMSs, the VARCHAR data type has a 2 or 4-byte indicator of the length of the stored string before the data itself, while CHAR does not require this information because it is fixed-length. This makes the CHAR

Re: [SQL] indexing on char vs varchar

2002-10-02 Thread Beth Gatewood
SorryI don't understand. The length is at the front of what? -Beth > -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 02, 2002 10:06 AM > To: Beth Gatewood > Cc: [EMAIL PROTECTED] > Subject: Re: [SQL] inde

Re: [SQL] indexing on char vs varchar

2002-10-02 Thread Bruce Momjian
We store all the text/char/varchar types with the length at the front so we don't have such optimizations. We do have "char", in quotes, which is a single character, but that's about it. --- Beth Gatewood wrote: > Hi- > >

[SQL] indexing on char vs varchar

2002-10-02 Thread Beth Gatewood
Hi- This is more just trying to understand what is going on under the hood of pgsql. I have read through the archives that there is no difference between index on char, varchar or text. I am wondering why? I understand all the arguments about saving space but I am specifically asking about ind