Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4gM2-0006By-Pd for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Feb 2013 23:30:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U4gM2-0000iN-AW for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Feb 2013 23:30:38 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4gM1-0000iI-K2 for pgsql-bugs@postgresql.org; Sun, 10 Feb 2013 23:30:37 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U4gLz-0001V3-Of for pgsql-bugs@postgresql.org; Sun, 10 Feb 2013 23:30:37 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id r1ANUU903523 for ; Sun, 10 Feb 2013 15:30:30 -0800 Message-ID: <51182D99.8090606@hogranch.com> Date: Sun, 10 Feb 2013 15:30:33 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------060309050803010102080309" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------060309050803010102080309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2/9/2013 3:25 AM, viswam mamilla wrote: > Iam using PostgreSQL 9.1 in my local system.when iam using this > database with vb.net my application gets very slow > while retriving data from database.if i used the same with access or > SQL database its is very fast. > > Can i know what is the problem.Iam using ODBC Connection for postgresql. you'd likely be better off with npgsql, which is a native .net data provider for postgres, instead of ODBC. > > here iam writing one sample table in postgresql. > > CREATE TABLE "AppUsers" > ( > "UserID" smallint, > "Name" character(100), > "EmailID" character(150), > "Password" character(20), > "UserRole" character(50) > ) you realize 'character(n)' are fixed length fields? so if name is 'joe blow', it will be padded to 100 characters with spaces? thats almost never what you want to do. instead use varchar(100) or character varying(100) (same thing), or just use text (no length specified), these formats return just what you store ('joe blow' will return an 8 char string). -- john r pierce 37N 122W somewhere on the middle of the left coast --------------060309050803010102080309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 2/9/2013 3:25 AM, viswam mamilla wrote:
Iam using PostgreSQL 9.1 in my local system.when iam using this database with vb.net my application gets very slow while retriving data from database.if i used the same with access or SQL database its is very fast.

Can i know what is the problem.Iam using ODBC Connection for postgresql.

you'd likely be better off with npgsql, which is a native .net data provider for postgres, instead of ODBC.


here iam writing one sample table in postgresql.

CREATE TABLE "AppUsers"
(
  "UserID" smallint,
  "Name" character(100),
  "EmailID" character(150),
  "Password" character(20),
  "UserRole" character(50)
)

you realize 'character(n)' are fixed length fields?   so if name is 'joe blow', it will be padded to 100 characters with spaces?   thats almost never what you want to do.  instead use varchar(100) or character varying(100) (same thing), or just use text (no length specified), these formats return just what you store ('joe blow' will return an 8 char string).



-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast
--------------060309050803010102080309--