There are some basic postgres commands, those we use daily basis like listing database, switching database, listing tables etc. Listing Database \l # or \list 2. Switching Database \connect sales # or \c sales 3. Listing Tables \dt
If you are working on Postgres and facing issues of slow queries then tuning the Postgres server can be a good point to optimize the performance by tuning the Postgres database. In this article, we will talk about increasing the… Continue Reading →
Sometime, we need to check the list of processes running inside database or check the status of query. Various database provides their own way to check it. MySQL:If you are on MySQL database then run the below sql to check… Continue Reading →
If you want to only extract digits from a string in Postgres, we can do it using regexp_replace. \D tell not digit and ‘g’ stand for global. SELECT NULLIF(regexp_replace(‘OTHERdsfd4 323 2323d42324 3ssf3 432`sfd’, ‘\D’,”,’g’), ”)::numeric AS result — Output: 432323234232433432… Continue Reading →
© 2024 My Beliefs
Write us at [email protected]