grzesiek999 / ztbd_project

Application to compare queries times in PostgreSQL vs MongoDB.
0 stars 0 forks source link

ztbd_project

MongoDB

1) Setup

  1. Run docker-compose up
  2. Run in terminal
    a) Enter mongosh:
    docker exec -it [CONTAINER_ID] mongosh

    b) Create the user with credentials from .env file`:

    use admin
    db.createUser({
      user: "[username]",
      pwd: "[password]",
      roles: [{ role: "root", db: "admin" }]
    })

    c) Set profiler:

    db.auth("[username]", "[password]")
    use [db_name]
    db.setProfilingLevel(1, { slowms: 0, filter: { "command.comment": "backend_query" } })

2) Run fastapi