Posts

Showing posts with the label postgres

How are AI tools helping solve real, complex, and time-consuming problems faster?

Nowadays, almost everyone is either using AI tools or thinking about incorporating them into their daily work. At the same time, many professionals are still hesitant, worrying that AI might replace their jobs. While those concerns are understandable, I believe the bigger risk is ignoring these tools altogether. From my experience, AI isn't replacing engineers—it is helping engineers work faster and focus on solving more meaningful problems. Like any other tool, its value depends on how effectively we use it. The more we learn to collaborate with AI, the more productive and efficient we can become. Here are two real examples from my recent work where AI tools helped me solve complex and time-consuming engineering problems significantly faster. AI helped me audit and upgrade my project's tech stack by checking dependency compatibility and flagging version-specific issues in advance. Instead of manually reviewing every package and verifying the latest compatible versions, I was ...

How to Upgrade or Downgrade Heroku Postgres adon plan

Image
If you are using Heroku and Postgres adon in your project, by the time you may want to upgrade or downgrade Heroku Postgres adon plan based upon your project's database size decrease or increase with time. Although you can follow Heroku documentation for the purpose: Changing the Plan or Infrastructure of a Heroku Postgres Database But I wish to introduce you to another way to upgrade or downgrade the Heroku PostgreSQL Database adon plan. In this process we have 3 steps to follow: 1. Add additional Heroku Postgres adon with the desired plan (you want to switch) using the below command:      heroku addons:create heroku-postgresql:adon-plan --app your-appname Where `adon-plan` can be replaced with the desired plan from the plan list and `your-appname` with your application name. 2. Now copy your database from the old Postgres adon to the newly added Postgres adon.           heroku pg:copy HEROKU_POSTGRESQL_MAUVE_URL HEROKU_POSTGRESQL_PINK_URL ...

Important things every developer need to know about Database Indexing

Assuming you know the basics of Database and know the definition of indexes used in DB, here are some important things about Database indexes about which every good developer must aware of: DB Indexing is used to read data faster, but it makes writing slower. Indexes use in-memory data structures. Indexes use B-Tree (Balanced Tree) data structure to store data and use Binary search for reading/searching. It always saves corresponding DB internal row-id (not table PK) with every indexed node in the B-tree It is not good to add an index to each column of a table. If you have applied index on certain column but in query use any function on an indexed column, the index will not help at all. You can create a combined index on multiple columns. Order matters as per query need. To understand the use of indexes or to know if the query is actually taking the benefit of your index on your column use Explain. Explain give you the execution plan of the query. Explain give you info abou...

Popular posts from this blog

Differences between json and jsonb - JSON data type in PostgreSQL

Laravel Validation - Unique rule with multiple column and condition.

Using Virtual Columns in Laravel - Accessors and Appends