Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musikanimal/sql-optimizer
Run EXPLAIN on Wikimedia Toolforge SQL queries
https://github.com/musikanimal/sql-optimizer
sql toolforge wikimedia wikipedia
Last synced: 3 days ago
JSON representation
Run EXPLAIN on Wikimedia Toolforge SQL queries
- Host: GitHub
- URL: https://github.com/musikanimal/sql-optimizer
- Owner: MusikAnimal
- License: mit
- Created: 2018-05-18T12:43:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:33:38.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T19:21:55.160Z (7 months ago)
- Topics: sql, toolforge, wikimedia, wikipedia
- Language: JavaScript
- Homepage: https://sql-optimizer.toolforge.org
- Size: 250 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL Optimizer
Run EXPLAIN on Wikimedia Toolforge SQL queries
https://sql-optimizer.toolforge.org
## Report bugs
You can report bugs or make feature requests by filing an issue on GitHub:
https://github.com/MusikAnimal/sql-optimizer/issuesOr you can use on
[Wikimedia's Phabricator](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=Tools&title=SQL%20Optimizer&description=https://tools.wmflabs.org/sql-optimizer&subscribers=MusikAnimal).
Please tag with the `Tools` project and add `MusikAnimal` as a subscriber.## Installation
Prerequisites:
* [Node.js](https://nodejs.org/en/) with the version specified by [.nvmrc](.nvmrc).
* [npm](https://www.npmjs.com/)
* A [Wikimedia developer account](https://wikitech.wikimedia.org/wiki/Help:Create_a_Wikimedia_developer_account)
and access to the [Toolforge environment](https://wikitech.wikimedia.org/wiki/Portal:Toolforge).Installation:
* `git clone https://github.com/MusikAnimal/sql-optimizer`
* `cd sql-optimizer`
* `npm install`
* Establish an SSH tunnel to the Toolforge replicas.
It is important to connect to a specific database server.
The command will be something similar to:ssh -L 4711:enwiki.web.db.svc.eqiad.wmflabs:3306 [email protected]
* `cp env.json.dist env.json` and fill out the details. In the above example,
the `db_port` would be `4711`.
* `npm run-script build && npm run-script start` - note you will need to re-run this
command as you make changes during development.
* You should be up and running at http://localhost:8000
* Note you can only query against the database you set up in your SSH tunnel (`enwiki` in the above example).
In production, the host in env.json is set to `*.web.db.svc.eqiad.wmflabs` which gets changed to the
appropriate host for the given database at run time.