How to improve PgSql Performance using npgsql

From: "Venkat Rao Tammineni" <vtammineni(at)roulacglobal(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: How to improve PgSql Performance using npgsql
Date: 2008-12-25 06:39:35
Message-ID: 001c01c9665b$8f007a00$ad016e00$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear All,

I am using npgsql.dll to connect postgresql database. Everything is
working fine.but sometimes database is getting slow and even sometimes I am
not getting data .I have written one function which access the data .

Below is my code ..

public NpgsqlConnection PgSqlDataConnection()

{

if (pgSqlConnection != null)

{

if (pgSqlConnection.State == ConnectionState.Open)

{

pgSqlConnection.Close();

//pgSqlConnection.Dispose();

}

}

pgConnectionString =
ConfigurationSettings.AppSettings["ConnectionString"].ToString();

pgSqlConnection = new NpgsqlConnection(pgConnectionString);

try

{

pgSqlConnection.Open();

}

catch (Exception exp)

{}

return pgSqlConnection;

}

Please let me where I am doing wrong.

I am waiting for your great response.

Advanced thanks.

Reagrds,

Venkat.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Hilco Wijbenga 2008-12-25 07:54:57 Re: How to improve PgSql Performance using npgsql
Previous Message Scott Marlowe 2008-12-24 16:54:03 Re: How much the max image size can be inserted into Postgresql