How to improve PgSql Performance using npgsql - Mailing list pgsql-sql

From Venkat Rao Tammineni
Subject How to improve PgSql Performance using npgsql
Date
Msg-id 001c01c9665b$8f007a00$ad016e00$@com
Whole thread Raw
Responses Re: How to improve PgSql Performance using npgsql
List 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.

pgsql-sql by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: How much the max image size can be inserted into Postgresql
Next
From: "Hilco Wijbenga"
Date:
Subject: Re: How to improve PgSql Performance using npgsql