https://github.com/sandinmyjoints/concurrent-mysql
https://github.com/sandinmyjoints/concurrent-mysql
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sandinmyjoints/concurrent-mysql
- Owner: sandinmyjoints
- Created: 2021-04-13T16:26:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-11T20:50:29.000Z (about 4 years ago)
- Last Synced: 2025-02-08T09:12:58.002Z (4 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# concurrent-mysql
Evaluating different strategies for handling concurrent updates.
1. Create this table in MySQL:
``` sql
CREATE TABLE `T` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
```2. Adjust script values numConcurrent and strategiesToTry.
3. Run with `DB_PASSWORD=password node index.js` and examine output for which
strategies were correct or incorrect.