- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个SQL语句,该语句使用通过另一组语句构建的一些表,这些表又由更多组语句等构建。以大约8度散开到大约25个表(在第4级变宽,但在该级别最终开始向下指向相同的几个常见资源)。
我正在为Graphviz创建一个点文件,该文件显示每个语句的选定列以及每个语句来自哪个表。由于涉及案例语句和函数,因此有时每列有多个来源。一旦达到几个级别,它不仅有点杂乱,而且很难正确地读写。
我一直在尝试寻找是否有一种工具可以分析SQL select语句和(而不是制作执行计划图)图表,这些图表的来龙去脉。优选地,该工具将能够将其与多层语句组合。
有人知道这样的工具吗?
您会看到,在Google上搜索“绘制sql语句”之类的内容最终会产生大量结果,说明如何使用SQL查询中的数据或特定于图形数据库的数据制作图表。既不在这里也不在那里,将“图形”更改为“可视化”也无济于事。
例如。
SELECT CASE WHEN A.info IS NULL THEN 'Jam'
WHEN B.inform LIKE 'N/A%' THEN 'Butter'
WHEN A.info > 4 THEN 'Apricot'
ELSE 'Organic'
END AS information,
-- More of the same
FROM 2_KU_4_SKU AS A
LEFT JOIN
SKU_HOWS_ROC AS B
ON A.fskuid = B.idfsk;
INSERT INTO 2_KU_4_SKU
-- More case statements and other stuff but lets just say
sku_id AS fskuid,
short_sku_desc AS info
FROM BASIC_SKU_TABLE_NOT_A_VIEW_TEDS_VERSION_LATEST_Q108;
INSERT INTO SKU_HOWS_ROC
-- You guessed it
sku_id AS idfsk, -- Because words
sku_blurb AS inform
FROM BASIC_SKU_TABLE_STILL_NOT_A_VIEW_BILLS_EXCELLENT_VERSION;
Digraph G {
fontname = "sans-serif";
node [fontname="sans-serif",shape="record"];
subgraph cluster0 {
label="SELECT";
information;
}
subgraph cluster1 {
label="SKU_HOWS_ROC";
a_idfsk [label="idfsk"];
a_info [label="info"];
}
a_info -> information;
subgraph cluster2 {
label="2_KU_4_SKU";
b_fskuid [label="fskuid"];
b_inform [label="inform"];
}
b_inform -> information;
b_fskuid -> a_idfsk -> b_fskuid;
subgraph cluster3 {
label="BASIC_SKU_TABLE_NOT_A_VIEW_TEDS_VERSION_LATEST_Q108";
c_sku_id [label="sku_id"];
c_short_sku_desc [label="short_sku_desc"];
}
c_short_sku_desc -> a_info;
c_sku_id -> a_idfsk;
subgraph cluster4 {
label="BASIC_SKU_TABLE_STILL_NOT_A_VIEW_BILLS_EXCELLENT_VERSION";
d_sku_id [label="sku_id"];
d_sku_blurb [label="sku_blurb"];
}
d_sku_id -> b_fskuid;
d_sku_blurb -> b_inform;
}
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.39.20160727.0821 (20160727.0821)
-->
<!-- Title: G Pages: 1 -->
<svg viewBox="0.00 0.00 988.00 265.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 261)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-261 984,-261 984,4 -4,4" />
<g id="clust2" class="cluster">
<title>cluster1</title>
<polygon fill="none" stroke="black" points="329,-91 329,-166 471,-166 471,-91 329,-91" />
<text text-anchor="middle" x="400" y="-150.8" font-family="sans-serif" font-size="14.00">SKU_HOWS_ROC</text>
</g>
<g id="clust1" class="cluster">
<title>cluster0</title>
<polygon fill="none" stroke="black" points="388,-8 388,-83 490,-83 490,-8 388,-8" />
<text text-anchor="middle" x="439" y="-67.8" font-family="sans-serif" font-size="14.00">SELECT</text>
</g>
<g id="clust3" class="cluster">
<title>cluster2</title>
<polygon fill="none" stroke="black" points="485,-91 485,-166 627,-166 627,-91 485,-91" />
<text text-anchor="middle" x="556" y="-150.8" font-family="sans-serif" font-size="14.00">2_KU_4_SKU</text>
</g>
<g id="clust5" class="cluster">
<title>cluster4</title>
<polygon fill="none" stroke="black" points="477,-174 477,-249 972,-249 972,-174 477,-174" />
<text text-anchor="middle" x="724.5" y="-233.8" font-family="sans-serif" font-size="14.00">BASIC_SKU_TABLE_STILL_NOT_A_VIEW_BILLS_EXCELLENT_VERSION</text>
</g>
<g id="clust4" class="cluster">
<title>cluster3</title>
<polygon fill="none" stroke="black" points="8,-174 8,-249 469,-249 469,-174 8,-174" />
<text text-anchor="middle" x="238.5" y="-233.8" font-family="sans-serif" font-size="14.00">BASIC_SKU_TABLE_NOT_A_VIEW_TEDS_VERSION_LATEST_Q108</text>
</g>
<!-- information -->
<g id="node1" class="node">
<title>information</title>
<polygon fill="none" stroke="black" points="396.373,-16.5 396.373,-52.5 481.627,-52.5 481.627,-16.5 396.373,-16.5" />
<text text-anchor="middle" x="439" y="-30.3" font-family="sans-serif" font-size="14.00">information</text>
</g>
<!-- a_idfsk -->
<g id="node2" class="node">
<title>a_idfsk</title>
<polygon fill="none" stroke="black" points="409,-99.5 409,-135.5 463,-135.5 463,-99.5 409,-99.5" />
<text text-anchor="middle" x="435.893" y="-113.3" font-family="sans-serif" font-size="14.00">idfsk</text>
</g>
<!-- b_fskuid -->
<g id="node4" class="node">
<title>b_fskuid</title>
<polygon fill="none" stroke="black" points="565,-99.5 565,-135.5 619,-135.5 619,-99.5 565,-99.5" />
<text text-anchor="middle" x="591.786" y="-113.3" font-family="sans-serif" font-size="14.00">fskuid</text>
</g>
<!-- a_idfsk->b_fskuid -->
<g id="edge4" class="edge">
<title>a_idfsk->b_fskuid</title>
<path fill="none" stroke="black" d="M446.616,-135.503C455.979,-149.063 471.07,-165.983 490,-170 504.373,-173.05 544.531,-175.185 556,-166 563.413,-160.064 570.086,-152.258 575.615,-144.648" />
<polygon fill="black" stroke="black" points="578.818,-146.164 581.557,-135.929 573.033,-142.222 578.818,-146.164" />
</g>
<!-- a_info -->
<g id="node3" class="node">
<title>a_info</title>
<polygon fill="none" stroke="black" points="337,-99.5 337,-135.5 391,-135.5 391,-99.5 337,-99.5" />
<text text-anchor="middle" x="363.786" y="-113.3" font-family="sans-serif" font-size="14.00">info</text>
</g>
<!-- a_info->information -->
<g id="edge1" class="edge">
<title>a_info->information</title>
<path fill="none" stroke="black" d="M380.274,-99.4902C390.62,-88.0401 404.181,-73.0328 415.665,-60.3245" />
<polygon fill="black" stroke="black" points="418.391,-62.5274 422.499,-52.7612 413.198,-57.8343 418.391,-62.5274" />
</g>
<!-- b_fskuid->a_idfsk -->
<g id="edge3" class="edge">
<title>b_fskuid->a_idfsk</title>
<path fill="none" stroke="black" d="M581.557,-135.929C575.195,-145.863 566.313,-157.741 556,-166 544.531,-175.185 504.373,-173.05 490,-170 474.767,-166.767 462.021,-155.18 452.744,-143.712" />
<polygon fill="black" stroke="black" points="455.403,-141.423 446.616,-135.503 449.793,-145.61 455.403,-141.423" />
</g>
<!-- b_inform -->
<g id="node5" class="node">
<title>b_inform</title>
<polygon fill="none" stroke="black" points="492.552,-99.5 492.552,-135.5 547.448,-135.5 547.448,-99.5 492.552,-99.5" />
<text text-anchor="middle" x="520" y="-113.3" font-family="sans-serif" font-size="14.00">inform</text>
</g>
<!-- b_inform->information -->
<g id="edge2" class="edge">
<title>b_inform->information</title>
<path fill="none" stroke="black" d="M502.424,-99.4902C491.145,-87.9321 476.328,-72.7493 463.852,-59.9655" />
<polygon fill="black" stroke="black" points="466.31,-57.4735 456.821,-52.7612 461.301,-62.3626 466.31,-57.4735" />
</g>
<!-- c_sku_id -->
<g id="node6" class="node">
<title>c_sku_id</title>
<polygon fill="none" stroke="black" points="404.766,-182.5 404.766,-218.5 461.234,-218.5 461.234,-182.5 404.766,-182.5" />
<text text-anchor="middle" x="433" y="-196.3" font-family="sans-serif" font-size="14.00">sku_id</text>
</g>
<!-- c_sku_id->a_idfsk -->
<g id="edge6" class="edge">
<title>c_sku_id->a_idfsk</title>
<path fill="none" stroke="black" d="M433.651,-182.49C434.037,-171.796 434.536,-157.999 434.975,-145.871" />
<polygon fill="black" stroke="black" points="438.476,-145.881 435.34,-135.761 431.481,-145.628 438.476,-145.881" />
</g>
<!-- c_short_sku_desc -->
<g id="node7" class="node">
<title>c_short_sku_desc</title>
<polygon fill="none" stroke="black" points="272.973,-182.5 272.973,-218.5 387.027,-218.5 387.027,-182.5 272.973,-182.5" />
<text text-anchor="middle" x="330" y="-196.3" font-family="sans-serif" font-size="14.00">short_sku_desc</text>
</g>
<!-- c_short_sku_desc->a_info -->
<g id="edge5" class="edge">
<title>c_short_sku_desc->a_info</title>
<path fill="none" stroke="black" d="M337.377,-182.49C341.847,-171.58 347.639,-157.441 352.679,-145.138" />
<polygon fill="black" stroke="black" points="355.968,-146.342 356.519,-135.761 349.49,-143.688 355.968,-146.342" />
</g>
<!-- d_sku_id -->
<g id="node8" class="node">
<title>d_sku_id</title>
<polygon fill="none" stroke="black" points="579.766,-182.5 579.766,-218.5 636.234,-218.5 636.234,-182.5 579.766,-182.5" />
<text text-anchor="middle" x="608" y="-196.3" font-family="sans-serif" font-size="14.00">sku_id</text>
</g>
<!-- d_sku_id->b_fskuid -->
<g id="edge7" class="edge">
<title>d_sku_id->b_fskuid</title>
<path fill="none" stroke="black" d="M604.528,-182.49C602.467,-171.796 599.807,-157.999 597.469,-145.871" />
<polygon fill="black" stroke="black" points="600.85,-144.918 595.52,-135.761 593.976,-146.243 600.85,-144.918" />
</g>
<!-- d_sku_blurb -->
<g id="node9" class="node">
<title>d_sku_blurb</title>
<polygon fill="none" stroke="black" points="484.648,-182.5 484.648,-218.5 561.352,-218.5 561.352,-182.5 484.648,-182.5" />
<text text-anchor="middle" x="523" y="-196.3" font-family="sans-serif" font-size="14.00">sku_blurb</text>
</g>
<!-- d_sku_blurb->b_inform -->
<g id="edge8" class="edge">
<title>d_sku_blurb->b_inform</title>
<path fill="none" stroke="black" d="M522.349,-182.49C521.963,-171.796 521.464,-157.999 521.025,-145.871" />
<polygon fill="black" stroke="black" points="524.519,-145.628 520.66,-135.761 517.524,-145.881 524.519,-145.628" />
</g>
</g>
</svg>
最佳答案
您也许可以使用MySQL Workbench中的Visual Explain功能。我没有亲自使用过它,但是看起来它可以提供比标准EXPLAIN命令更好的洞察力。看看这个链接,祝你好运!
https://dev.mysql.com/doc/workbench/en/wb-tutorial-visual-explain-dbt3.html
关于sql - 可视化正在使用什么sql语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38869432/
我有一个加号/减号按钮,希望用户不能选择超过 20 个但不知道如何让它工作。我尝试使用 min="1"max="5 属性,但它们不起作用。这是我的代码和一个 fiddle 链接。https://jsf
我正在尝试复制顶部底部图,如示例 here但它没有正确渲染(紫色系列有 +ve 和 -ve 值,绿色为负值)留下杂乱的人工制品。我也在努力创建一个玩具示例来复制这个问题,所以我希望尽管我缺乏数据,但有
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 已关闭 6 年前。 社区去年审查了是
这个问题在这里已经有了答案: Adding two positive integers gives negative answer.Why? (4 个答案) 关闭 5 年前。 我遇到了一个奇怪的问题
有谁知道如何将字符串值类型 -4,5 或 5,4 转换为 double -4.5 或 5.4? 最佳答案 只需使用 Double.parseDouble(Locale, String); 糟糕,我很困
我正在尝试根据 TextBlob 分类插入一个仅包含“正”或“负”字符串的新数据框列:对于我的 df 的第一行,结果是 ( pos , 0.75, 0.2499999999999997)我想要' 正
我对 VBA 非常陌生,无法理解如何在一个循环中完成 2 个任务。我非常感谢您的帮助。 我已经能够根据第 3 列中的数据更改第 2 列中的数值,但我不明白如何将负值的字体更改为红色。 表格的大小每月都
欢迎, 我正在使用 jquery 通过 POST 发送表单。 这就是我获得值(value)的方式。 var mytext = $("#textareaid").val(); var dataStrin
double d = 0; // random decimal value with it's integral part within the range of Int32 and always p
我有这个字符串: var a='abc123#xyz123'; 我想构建 2 个正则表达式替换函数: 1) 用 '*' 替换所有确实有 future '#'的字符(不包括'#') 所以结果应该是这样的
我正在使用 DialogFragment。当用户从 Gmail 平板电脑应用程序的屏幕与下面示例图片中的编辑文本进行交互时,我希望正面和负面按钮保持在键盘上方。 在我的尝试中不起作用,这是我的 Dia
从组装艺术一书中,我复制了这句话: In the two’s complement system, the H.O. bit of a number is a sign bit. If the H.O
是否有更好更优雅的方法来实现下面的简单代码(diffYear、A 和 B 是数字): diffYear = yearA - yearB; if (diffYear == 0) { A = B
我正在设计一种语言,并尝试确定 true 应该是 0x01 还是 0xFF。显然,所有非零值都将转换为 true,但我正在尝试确定确切的内部表示。 每种选择的优点和缺点是什么? 最佳答案 没关系,只要
在我的 dialogfragment 类的 OnCreateDialog 中,我正在这样做: AlertDialog.Builder builder = new AlertDialog.Builder
这个问题在这里已经有了答案: Resolving ambiguous overload on function pointer and std::function for a lambda usin
我偶然发现了一个奇怪的 NSDecimalNumber 行为:对于某些值,调用 integerValue、longValue、longLongValue 等,返回意想不到的值(value)。示例: l
这个问题在这里已经有了答案: Resolving ambiguous overload on function pointer and std::function for a lambda using
我有这个正则表达式来测试用户输入是否有效: value.length === 0 || value === '-' || (!isNaN(parseFloat(value)) && /^-?\d+\.
我想用高斯混合模型拟合数据集,数据集包含大约 120k 个样本,每个样本有大约 130 个维度。当我使用 matlab 执行此操作时,我运行脚本(簇号为 1000): gm = fitgmdist(d
我是一名优秀的程序员,十分优秀!