Postgres Explain Visualizer

栏目: IT技术 · 发布时间: 4年前

内容简介:A VueJS component to show a graphical vizualization of a PostgreSQL execution plan.SeeThis project is a rewrite of the excellent

pev2

A VueJS component to show a graphical vizualization of a PostgreSQL execution plan.

See Demo .

Disclaimer

This project is a rewrite of the excellent Postgres Explain Visualizer (pev) . Kudos go to Alex Tatiyants .

The pev project was initialy written in early 2016 but seems to be abandonned since then. There was no activity at all for more than 3 years and counting though there are several issues open and relevant pull requests pending.

The current project has several goals:

  • isolate the plan view component and its dependencies in order to use it in any web app with for example the ability to load a plan without requiring any 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.

Usage

PEV2 is intended to be used as VueJS component.

Install it:

npm install pev2

Declare the PEV2 component and use it:

import pev2 from "pev2";

new Vue({
  el: "#app",
  data: function() {
    return {
      plan: plan,
      query: query
    };
  },
  components: {
    pev2: pev2
  }
});

Then add the PEV2 component to your template:

<div id="app">
  <pev2 :plan-source="plan" :plan-query="query"></pev2>
</div>

PEV2 requires Bootstrap (CSS) and FontAwesome to work so don't forget to add the following in you header (or load them with your favorite bundler).

<link
  href="https://unpkg.com/bootstrap@4.3.1/dist/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.css"
  rel="stylesheet"
/>

For a complete example, see this codesandbox .


以上所述就是小编给大家介绍的《Postgres Explain Visualizer》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Swift编程权威指南(第2版)

Swift编程权威指南(第2版)

[美] Matthew Mathias、[美] John Gallagher / 陈晓亮 / 人民邮电出版社 / 2017-6 / 89.00元

Big Nerd Ranch是美国一家专业的移动开发技术培训机构,本书是其培训教材。书中系统讲解了在iOS和macOS平台上,使用苹果的Swift语言开发iPhone、iPad和Mac应用的基本概念和编程技巧。主要围绕使用Swift语言进行iOS和macOS开发,结合大量代码示例,教会读者利用高级iOS和macOS特性开发真实的应用。一起来看看 《Swift编程权威指南(第2版)》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具