Skip to content

Instantly share code, notes, and snippets.

@dincosman
Created June 2, 2024 20:24
Show Gist options
  • Select an option

  • Save dincosman/177de2fc9354672ff4431aec08eb2aab to your computer and use it in GitHub Desktop.

Select an option

Save dincosman/177de2fc9354672ff4431aec08eb2aab to your computer and use it in GitHub Desktop.
Insert 1000000 rows using NoSQL Protocol Module for MariaDB
osmandinc@192 mongoapi % node 1mri_maria.js
(node:12520) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Inserted: 1000000 rows
Operation took: 42442.361542 milliseconds
[root@mongo01 ~]# mongosh --host 192.168.60.204 --port 27004
Current Mongosh Log ID: 665c9f36406e5818812202d7
Connecting to: mongodb://192.168.60.204:27004/?directConnection=true&appName=mongosh+2.2.5
Using MongoDB: 4.4.1
Using Mongosh: 2.2.5
mongosh 2.2.6 is available for download: https://www.mongodb.com/try/download/shell
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
test> db.posts.count();
DeprecationWarning: Collection.count() is deprecated. Use countDocuments or estimatedDocumentCount.
1000000
[root@maria01 ~]# mariadb
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 37
Server version: 11.4.2-MariaDB MariaDB Server
MariaDB [test]> show columns from posts;
+-------+-------------+------+-----+---------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------------------+
| id | varchar(35) | YES | UNI | NULL | VIRTUAL GENERATED |
| doc | longtext | YES | | NULL | |
+-------+-------------+------+-----+---------+-------------------+
2 rows in set (0.002 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment