- Notifications
You must be signed in to change notification settings - Fork0
Postgres Explain Visualizer 2
License
neondatabase/pev2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A VueJS component to show a graphical vizualization of a PostgreSQL execution plan.
To use the explain vizualizer you can choose one of the following options:
This service is provided byDalibo
and can help you to share your plans withcolleagues or customers.
PEV2 can be run locally.
Simply downloadpev2.tar.gz,extract the archive and openindex.html
in your favorite internet browser.
SeeCONTRIBUTING.
PEV2 can be integrated as a component in a web application.
Install it:
npm install pev2
Declare thePEV2
component and use it:
importpev2from"pev2";newVue({el:"#app",data:function(){return{plan:plan,query:query,};},components:{pev2:pev2,},});
Then add thePEV2
component to your template:
<divid="app"><pev2:plan-source="plan":plan-query="query"></pev2></div>
PEV2
requiresBootstrap (CSS)
andFontAwesome
to work so don't forget toadd the following in you header (or load them with your favorite bundler).
<linkhref="https://unpkg.com/bootstrap@4.5.0/dist/css/bootstrap.min.css"rel="stylesheet"/><linkhref="https://unpkg.com/@fortawesome/fontawesome-free@5.13.0/css/all.css"rel="stylesheet"/>
For a complete example, seethis codesandbox.
// index.js// import component without stylesimportPev2from"pev2/components/pev2.common";
// styles.scss// add pev2 vendor styles@import"~tippy.js/dist/tippy.css";@import"~splitpanes/dist/splitpanes.css";// use any theme from highlight.js@import"~highlight.js/styles/github.css";// import pev2 variables@import"~pev2/scss/variables";// redefine variables from '~pev2/scss/variables' file$text-color:red;// import the rest of pev2 scss styles@import"~pev2/scss/pev2";
This project is a rewrite of the excellentPostgres Explain Visualizer(pev). Kudos go toAlex Tatiyants.
Thepev project was initialy written in early 2016 but seems to beabandoned since then. There was no activity at all for more than 3 years andcounting though there are several issues open and relevant pull requestspending.
The current project has several goals:
- isolate the plan view component and its dependencies in order to use it inany web app with for example the ability to load a plan without requiringany copy-paste from the user,
- make it work with recent version of JS frameworks,
- upgrade Bootstrap to a more recent version,
- use VueJS just for a matter of taste,
- maintain the project to match upgrades in PostgreSQL.
About
Postgres Explain Visualizer 2
Topics
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- TypeScript56.0%
- Vue36.2%
- SCSS6.0%
- PLpgSQL1.2%
- JavaScript0.3%
- HTML0.2%
- Dockerfile0.1%