SQL
How to Export a Remote PostgreSQL Database and Import it locally?
·1 min read
Mayukh Datta
Technical
SQL
Create a dump of the remote database using pg_dump command pg_dump --host=remote_host_name --port=remote_port_number --username=remote_database_user_name --dbname=database_name > db_export.sql You will get a dump SQL file of the remote database upon successful completion of this process.
Create a database on your local setup with the same name as the remote database. psql --username=local_database_user_name -c 'create database database_name;’ The database has now been created on your local machine.
Import the data to your local database. psql --username=local_database_user_name database_name < db_export.sql And, done!
Performance Optimization using Pivot Tables Technique in MySQL
·4 mins read
Mayukh Datta
Technical
SQL
Making a database call is an expensive operation. It involves opening a connection to the database, and the SQL query passed through this connection to the database is parsed, optimized, and then finally executed.
The process of opening a new connection to the database takes a significant amount of time and space. If we keep on opening new connections every time for each new request to our application, it would take a lot of time to send the response back and would also exceed our memory resources. To solve this problem, we use some connection pooling mechanisms to open/close, reuse and maintain connections to the database. Spring Boot by default uses HikariCP, which is a connection pooling tool. This means that the web application doesn’t have to face any delay in serving response due to managing database connections.
Nth Highest Salary LeetCode Solution
·2 mins read
Leetcode
SQL
Swap Salary LeetCode Solution
·1 min read
Leetcode
SQL
Rising Temperature LeetCode Solution
·1 min read
Leetcode
SQL
Not Boring Movies LeetCode Solution
·1 min read
Leetcode
SQL
Classes More Than 5 Students LeetCode Solution
·1 min read
Leetcode
SQL
Second Highest Salary LeetCode Solution
·1 min read
Leetcode
SQL
Employees Earning More Than Their Managers LeetCode Solution
·1 min read
Leetcode
SQL
Duplicate Emails LeetCode Solution
·1 min read
Leetcode
SQL
Delete Duplicate Emails LeetCode Solution
·1 min read
Leetcode
SQL
Customers Who Never Order LeetCode Solution
·1 min read
Leetcode
SQL