There are queries which takes more times to execute. Sometimes you need to stop the queries but you can't do it simply(Ctrl+c) because queries are coming from application. There are mainly two approaches to kill the query. You can find the process corresponding to the query & kill or you can find the procpid of … Continue reading kill a running query in postgres
Postgresql
Postgresql Information
Disable an index in postgres
If you have got one index on a table that you would like to temporarily disable you can do following steps. You can poke the system catalogue to disable an index: This means that the index won't be used for queries but will still be updated. It's one of the flags used for concurrent index … Continue reading Disable an index in postgres
‘ascii’ codec can’t encode characters : ordinal not in range(128)
I work on a system which fetches data from a database (Postgres) using python & writes them into a csv file. Few days ago i came through an error which was showing "ascii codec can't encode characters : ordinal not in range(128)" whenever i tried to fetch data from a particular date range. Problem : … Continue reading ‘ascii’ codec can’t encode characters : ordinal not in range(128)
PostgreSQL Indexes
There are many types of indexes in Postgres, as well as different ways to use them. In this article we give an overview of the types of indexes available, and explain different ways of using and maintaining the most common index type: B-Trees. An index is a way to efficiently retrieve a relatively small number … Continue reading PostgreSQL Indexes