PowerSQL By Prashanth Jayaram

Blog Post

MongoDB – Insert,Update,Upsert and Delete Examples – CRUD

In MongoDB we have to use either insert() or save() method to add the document to a collection

Insert Single document
> db.employee.insert( 
    {"employee_id":1101, 
    "name":"Prashanth", 
    "sal":90000, 
    "dob": newDate(1983,2,3,5,20), 
    "department": 
        [ 
            'DB Amdin','DB Developer' 
        ], 
    "Location":"New York"});
Insert Multiple...

2016-04-20

726 reads

Blog Post

MongoDB -Get Total datasize of all DB’s

var sum = 0; db.getMongo().getDBs()[“databases”].forEach(function(x) { sum += db.getMongo().getDB(x.name).stats().dataSize }); print(sum );

OR
db = db.getSiblingDB(“admin”);
dbs = db.runCommand({ “listDatabases”: 1 }).databases;
var sum1=0;dbs.forEach(function(database) { sum1+=db.getMongo().getDB(database.name).stats().dataSize }); print(sum1);

2016-04-11

435 reads

Blogs

Using Flyway Prepare for State-Based Deployments

By

One of the neat enhancements made to Flyway was the addition of state-based workflows...

How I Migrated to Azure PostgreSQL Flex from Single Server

By

I did a couple of posts previously on dumping/restoring Azure PostgreSQL databases and also...

Have a Plan for Your Personal Downtime

By

Most of us know that spending a lot of time on social media and...

Read the latest Blogs

Forums

Reporting Services in Managed Instance

By Arjun SreeVastsva

Hi , one of my on-premises servers one server is having databases and one...

EXTENDED EVENTS Track What's Logging In

By Super Cat

Simple one looking for a script that can track what's logging in from where...

Proc cache slowly decreasing in size until restart is required

By Bouke Bruinsma

In SQL 2017 (14.0.3475.1) the size of the proc cache is slowly decreasing. The...

Visit the forum

Question of the Day

Hash Joins IV

What is a hash bailout?

See possible answers