- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在执行简单的 LEFT JOIN 时遇到问题。
当我运行 EXPLAIN SELECT * FROM Feature f LEFT JOIN feature_translations t ON f.id = t.object_id
时,我得到了以下结果:
+----+-------------+-------+------+---------------------------+------+---------+------+--------+----------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+---------------------------+------+---------+------+--------+----------------------------------------------------+
| 1 | SIMPLE | f | ALL | NULL | NULL | NULL | NULL | 249200 | NULL |
| 1 | SIMPLE | t | ALL | IDX_7ED26C14232D562B,olol | NULL | NULL | NULL | 1 | Using where; Using join buffer (Block Nested Loop) |
+----+-------------+-------+------+---------------------------+------+---------+------+--------+----------------------------------------------------+
在这里我可以看到 Join 没有使用现有的索引!!!如果我删除几乎所有行,则使用索引。这就是为什么我认为它只是一个配置变量,但我不知道是哪一个!
遵循我的表结构。
CREATE TABLE IF NOT EXISTS `Feature` (
`id` int(11) NOT NULL,
`site_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`clientId` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`signature` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=1866705 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `Feature`
ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `UNIQ_D06A4CFAF6BD1646AE880141` (`site_id`,`signature`), ADD KEY `IDX_D06A4CFAF6BD1646` (`site_id`), ADD KEY `IDX_D06A4CFAAE880141F6BD1646` (`signature`,`site_id`), ADD KEY `IDX_D06A4CFAEA1CE9BEF6BD1646` (`clientId`,`site_id`);
CREATE TABLE IF NOT EXISTS `feature_translations` (
`id` int(11) NOT NULL,
`object_id` int(11) DEFAULT NULL,
`locale` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
`field` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`content` longtext COLLATE utf8_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `feature_translations`
ADD PRIMARY KEY (`id`), ADD KEY `IDX_7ED26C14232D562B` (`object_id`), ADD KEY `feature_translation_idx` (`locale`,`field`,`object_id`);
ALTER TABLE `feature_translations`
ADD CONSTRAINT `FK_7ED26C14232D562B` FOREIGN KEY (`object_id`) REFERENCES `Feature` (`id`) ON DELETE CASCADE;
谢谢!
编辑
感谢您的回复!
认为这个请求来自一个更大的请求。我正在使用 Doctrine,我尝试在我用过的表上使用大连接。这工作正常,但有 3 个表大大降低了我的表现。在这种情况下使用连接的性能低于多个请求。
我要运行的请求是
SELECT * FROM Product p1_ INNER JOIN Poi p0_ ON p1_.id = p0_.id INNER JOIN Site s42_ ON p0_.site_id = s42_.id LEFT JOIN PoiLogoLink p2_ ON p0_.id = p2_.poi_id LEFT JOIN File f3_ ON p2_.file_id = f3_.id LEFT JOIN PoiPictureLink p4_ ON p0_.id = p4_.poi_id LEFT JOIN File f5_ ON p4_.file_id = f5_.id LEFT JOIN poi_translations p6_ ON p0_.id = p6_.object_id LEFT JOIN CustomObject c7_ ON p0_.id = c7_.poi_id LEFT JOIN Picto p8_ ON c7_.id = p8_.id LEFT JOIN Label l9_ ON c7_.id = l9_.id LEFT JOIN custom_objects_translations c10_ ON c7_.id = c10_.object_id LEFT JOIN category_poi c43_ ON p0_.id = c43_.poi_id LEFT JOIN Category c11_ ON c11_.id = c43_.category_id LEFT JOIN category_translations c12_ ON c11_.id = c12_.object_id LEFT JOIN place_poi p44_ ON p0_.id = p44_.poi_id LEFT JOIN Place p13_ ON p13_.id = p44_.place_id LEFT JOIN PoiLink p14_ ON p0_.id = p14_.childId LEFT JOIN Poi p15_ ON p14_.parentId = p15_.id LEFT JOIN Person p16_ ON p15_.id = p16_.id LEFT JOIN Store s17_ ON p15_.id = s17_.id LEFT JOIN Product p18_ ON p15_.id = p18_.id LEFT JOIN Exhibitor e19_ ON p15_.id = e19_.id LEFT JOIN Room r20_ ON p15_.id = r20_.id LEFT JOIN Service s21_ ON p15_.id = s21_.id LEFT JOIN PoiLink p22_ ON p0_.id = p22_.parentId LEFT JOIN Poi p23_ ON p22_.childId = p23_.id LEFT JOIN Person p24_ ON p23_.id = p24_.id LEFT JOIN Store s25_ ON p23_.id = s25_.id LEFT JOIN Product p26_ ON p23_.id = p26_.id LEFT JOIN Exhibitor e27_ ON p23_.id = e27_.id LEFT JOIN Room r28_ ON p23_.id = r28_.id LEFT JOIN Service s29_ ON p23_.id = s29_.id LEFT JOIN poi_translations p30_ ON p23_.id = p30_.object_id LEFT JOIN PoiMediaLink p31_ ON p0_.id = p31_.poi_id LEFT JOIN Media m32_ ON p31_.media_id = m32_.id LEFT JOIN MediaText m33_ ON m32_.id = m33_.id LEFT JOIN MediaImage m34_ ON m32_.id = m34_.id LEFT JOIN MediaVideo m35_ ON m32_.id = m35_.id LEFT JOIN MediaPdf m36_ ON m32_.id = m36_.id LEFT JOIN Movie m37_ ON m32_.id = m37_.id LEFT JOIN MediaUrl m38_ ON m32_.id = m38_.id LEFT JOIN media_translations m39_ ON m32_.id = m39_.object_id LEFT JOIN product_feature p45_ ON p1_.id = p45_.product_id LEFT JOIN Feature f40_ ON f40_.id = p45_.feature_id LEFT JOIN feature_translations f41_ ON f40_.id = f41_.object_id WHERE s42_.id IN (15) ORDER BY p0_.id ASC LIMIT 100 OFFSET 0;
100 rows in set (15,43 sec)
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------ +----------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------+----------------------------------------------------+
| 1 | SIMPLE | s42_ | const | PRIMARY | PRIMARY | 4 | const | 1 | Using temporary; Using filesort |
| 1 | SIMPLE | p0_ | ref | PRIMARY,UNIQ_45F65936F6BD1646AE880141,IDX_45F65936F6BD1646 | IDX_45F65936F6BD1646 | 4 | const | 8875 | NULL |
| 1 | SIMPLE | p1_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | p2_ | ref | IDX_7990D9C97EACE855 | IDX_7990D9C97EACE855 | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | f3_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p2_.file_id | 1 | NULL |
| 1 | SIMPLE | p4_ | ref | IDX_6CC279957EACE855 | IDX_6CC279957EACE855 | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | f5_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p4_.file_id | 1 | NULL |
| 1 | SIMPLE | p6_ | ref | IDX_9478F0F7232D562B | IDX_9478F0F7232D562B | 5 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | c7_ | ref | IDX_FE0561D77EACE855 | IDX_FE0561D77EACE855 | 5 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | p8_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | l9_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | c10_ | ref | IDX_A653A52A232D562B | IDX_A653A52A232D562B | 5 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | c43_ | ref | IDX_5879B28C7EACE855 | IDX_5879B28C7EACE855 | 4 | adsum.p0_.id | 1 | Using index |
| 1 | SIMPLE | c11_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c43_.category_id | 1 | NULL |
| 1 | SIMPLE | c12_ | ref | IDX_1C60F915232D562B | IDX_1C60F915232D562B | 5 | adsum.c11_.id | 1 | NULL |
| 1 | SIMPLE | p44_ | ref | IDX_720979277EACE855 | IDX_720979277EACE855 | 4 | adsum.p0_.id | 1 | Using index |
| 1 | SIMPLE | p13_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p44_.place_id | 1 | NULL |
| 1 | SIMPLE | p14_ | ref | IDX_64E377A92FD6B47 | IDX_64E377A92FD6B47 | 5 | adsum.p0_.id | 4 | NULL |
| 1 | SIMPLE | p15_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p14_.parentId | 1 | NULL |
| 1 | SIMPLE | p16_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | s17_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | p18_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | e19_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | r20_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | s21_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | p22_ | ref | IDX_64E377A910EE4CEE | IDX_64E377A910EE4CEE | 5 | adsum.p0_.id | 2 | NULL |
| 1 | SIMPLE | p23_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p22_.childId | 1 | NULL |
| 1 | SIMPLE | p24_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | s25_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | p26_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | e27_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | r28_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | s29_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | p30_ | ref | IDX_9478F0F7232D562B | IDX_9478F0F7232D562B | 5 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | p31_ | ref | IDX_5D2C1AE27EACE855 | IDX_5D2C1AE27EACE855 | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | m32_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p31_.media_id | 1 | NULL |
| 1 | SIMPLE | m33_ | ALL | PRIMARY | NULL | NULL | NULL | 1 | Using where; Using join buffer (Block Nested Loop) |
| 1 | SIMPLE | m34_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.m32_.id | 1 | NULL |
| 1 | SIMPLE | m35_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.m32_.id | 1 | NULL |
| 1 | SIMPLE | m36_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.m32_.id | 1 | NULL |
| 1 | SIMPLE | m37_ | ALL | PRIMARY | NULL | NULL | NULL | 1 | Using where; Using join buffer (Block Nested Loop) |
| 1 | SIMPLE | m38_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.m32_.id | 1 | NULL |
| 1 | SIMPLE | m39_ | ref | IDX_AF46700B232D562B | IDX_AF46700B232D562B | 5 | adsum.m32_.id | 1 | NULL |
| 1 | SIMPLE | p45_ | ref | PRIMARY,IDX_CE0E6ED64584665A | IDX_CE0E6ED64584665A | 4 | adsum.p0_.id | 2 | Using index |
| 1 | SIMPLE | f40_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p45_.feature_id | 1 | NULL |
| 1 | SIMPLE | f41_ | ALL | IDX_7ED26C14232D562B | NULL | NULL | NULL | 1 | Using where; Using join buffer (Block Nested Loop) |
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------+----------------------------------------------------+
但是如果我删除了不使用键的表
SELECT * FROM Product p1_ INNER JOIN Poi p0_ ON p1_.id = p0_.id INNER JOIN Site s31_ ON p0_.site_id = s31_.id LEFT JOIN PoiLogoLink p2_ ON p0_.id = p2_.poi_id LEFT JOIN File f3_ ON p2_.file_id = f3_.id LEFT JOIN PoiPictureLink p4_ ON p0_.id = p4_.poi_id LEFT JOIN File f5_ ON p4_.file_id = f5_.id LEFT JOIN poi_translations p6_ ON p0_.id = p6_.object_id LEFT JOIN CustomObject c7_ ON p0_.id = c7_.poi_id LEFT JOIN Picto p8_ ON c7_.id = p8_.id LEFT JOIN Label l9_ ON c7_.id = l9_.id LEFT JOIN custom_objects_translations c10_ ON c7_.id = c10_.object_id LEFT JOIN category_poi c32_ ON p0_.id = c32_.poi_id LEFT JOIN Category c11_ ON c11_.id = c32_.category_id LEFT JOIN category_translations c12_ ON c11_.id = c12_.object_id LEFT JOIN place_poi p33_ ON p0_.id = p33_.poi_id LEFT JOIN Place p13_ ON p13_.id = p33_.place_id LEFT JOIN PoiLink p14_ ON p0_.id = p14_.childId LEFT JOIN Poi p15_ ON p14_.parentId = p15_.id LEFT JOIN Person p16_ ON p15_.id = p16_.id LEFT JOIN Store s17_ ON p15_.id = s17_.id LEFT JOIN Product p18_ ON p15_.id = p18_.id LEFT JOIN Exhibitor e19_ ON p15_.id = e19_.id LEFT JOIN Room r20_ ON p15_.id = r20_.id LEFT JOIN Service s21_ ON p15_.id = s21_.id LEFT JOIN PoiLink p22_ ON p0_.id = p22_.parentId LEFT JOIN Poi p23_ ON p22_.childId = p23_.id LEFT JOIN Person p24_ ON p23_.id = p24_.id LEFT JOIN Store s25_ ON p23_.id = s25_.id LEFT JOIN Product p26_ ON p23_.id = p26_.id LEFT JOIN Exhibitor e27_ ON p23_.id = e27_.id LEFT JOIN Room r28_ ON p23_.id = r28_.id LEFT JOIN Service s29_ ON p23_.id = s29_.id LEFT JOIN poi_translations p30_ ON p23_.id = p30_.object_id WHERE s31_.id IN (15) ORDER BY p0_.id ASC LIMIT 100 OFFSET 0;
100 rows in set (0,02 sec)
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------+-------------+
| 1 | SIMPLE | s31_ | const | PRIMARY | PRIMARY | 4 | const | 1 | NULL |
| 1 | SIMPLE | p0_ | ref | PRIMARY,UNIQ_45F65936F6BD1646AE880141,IDX_45F65936F6BD1646 | IDX_45F65936F6BD1646 | 4 | const | 8875 | Using where |
| 1 | SIMPLE | p1_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | p2_ | ref | IDX_7990D9C97EACE855 | IDX_7990D9C97EACE855 | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | f3_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p2_.file_id | 1 | NULL |
| 1 | SIMPLE | p4_ | ref | IDX_6CC279957EACE855 | IDX_6CC279957EACE855 | 4 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | f5_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p4_.file_id | 1 | NULL |
| 1 | SIMPLE | p6_ | ref | IDX_9478F0F7232D562B | IDX_9478F0F7232D562B | 5 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | c7_ | ref | IDX_FE0561D77EACE855 | IDX_FE0561D77EACE855 | 5 | adsum.p0_.id | 1 | NULL |
| 1 | SIMPLE | p8_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | l9_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | c10_ | ref | IDX_A653A52A232D562B | IDX_A653A52A232D562B | 5 | adsum.c7_.id | 1 | NULL |
| 1 | SIMPLE | c32_ | ref | IDX_5879B28C7EACE855 | IDX_5879B28C7EACE855 | 4 | adsum.p0_.id | 1 | Using index |
| 1 | SIMPLE | c11_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.c32_.category_id | 1 | NULL |
| 1 | SIMPLE | c12_ | ref | IDX_1C60F915232D562B | IDX_1C60F915232D562B | 5 | adsum.c11_.id | 1 | NULL |
| 1 | SIMPLE | p33_ | ref | IDX_720979277EACE855 | IDX_720979277EACE855 | 4 | adsum.p0_.id | 1 | Using index |
| 1 | SIMPLE | p13_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p33_.place_id | 1 | NULL |
| 1 | SIMPLE | p14_ | ref | IDX_64E377A92FD6B47 | IDX_64E377A92FD6B47 | 5 | adsum.p0_.id | 4 | NULL |
| 1 | SIMPLE | p15_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p14_.parentId | 1 | NULL |
| 1 | SIMPLE | p16_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | s17_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | p18_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | e19_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | r20_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | s21_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p15_.id | 1 | NULL |
| 1 | SIMPLE | p22_ | ref | IDX_64E377A910EE4CEE | IDX_64E377A910EE4CEE | 5 | adsum.p0_.id | 2 | NULL |
| 1 | SIMPLE | p23_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p22_.childId | 1 | NULL |
| 1 | SIMPLE | p24_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | s25_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | p26_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | e27_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | r28_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | s29_ | eq_ref | PRIMARY | PRIMARY | 4 | adsum.p23_.id | 1 | NULL |
| 1 | SIMPLE | p30_ | ref | IDX_9478F0F7232D562B | IDX_9478F0F7232D562B | 5 | adsum.p23_.id | 1 | NULL |
+----+-------------+-------+--------+------------------------------------------------------------+----------------------+---------+------------------------+------+-------------+
在这里,我认为我的第一个请求中有一个非常糟糕的事情
最佳答案
LEFT JOIN
在MySQL中的执行方式是执行两个嵌套循环:外层循环遍历左表,内层循环遍历内表。如果内表有很多行,并且 ON
条件的列上有索引,它将使用该索引来加速内循环。请注意,外部表上的索引无助于加速外部循环,因为它无论如何都需要遍历左表的所有行。
在解释中,您提供的右表只有一行。 MySQL
巧妙地得出结论,它不需要任何索引,因为对该表的全表扫描与使用索引一样快(甚至更快,因为避免了与使用索引相关的开销),所以它选择在每次迭代时执行表的全扫描(即,单行的全扫描)。
如果您的右表有更多行,那么 MySQL 会选择使用该索引。
最后请注意,如果您的连接是 INNER JOIN
,而不是 LEFT JOIN
,MySQL 可能足够聪明,可以颠倒表的顺序,并使用您的feature_translations
作为外部表,在这种情况下,它将能够利用内部 Feature
表上的索引。
关于Mysql左连接不使用外键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33763883/
这个问题已经有答案了: Declaring multiple object pointers on one line causes compiler error (5 个回答) 已关闭 6 年前。 l
我目前正在学习语言处理器,经常出现的一个话题是语法中元素的使用方向。从左到右或从右到左。 我理解这个概念,但似乎有很多方法可以编写这些规则,我不确定它们是否都相同。到目前为止我看到的是: 右/左递归,
我有一个很长的线性(分支不多)流程图,在 graphviz 中显示为要么太高而无法放在单个页面上,要么太宽(如果方向是从左到右) 是否有一种简单的方法可以让 graphviz 以从左到右,然后向下,然
我一直摸不着头脑,但运气不好。设计器有一个包含 3 栏的站点、两个侧边栏和一个主要内容区域。 专为桌面设计,左栏、主要内容、右栏。但是,在较小的设备上,我们希望首先堆叠主要内容。 所以通常情况下,你可
我想要从上到下和从左到右组织的 css block 。 为了更好地解释这是一张图片,其中包含我到目前为止所获得的内容以及我希望使用 CSS 实现的内容: 代码如下: HTML: 1 2 3 4 5
当我问this question时,答案之一(现已删除)建议Either类型对应Curry-Howard correspondence中的XOR而不是OR,因为它不能同时是Left和Right。 真相
我有一个程序,如果用户按住向左或向右箭头键, Angular 色会逐渐朝那个方向加速,并最终达到最大速度。松开按键后, Angular 色逐渐减速,直至完全停止。 我的右方向键没问题,但左方向键坏了。
今天很简单的一个。我有一个专栏,我们称之为标题,有一堆项目标题。我需要从“:”的左侧拉出所有内容并进行左/右修剪(稍后我将在连接中使用它,但我现在只需要一个包含新数据的列) .下面是当前列的示例: 这
我正在尝试将图表中的列与左侧对齐。默认情况下,它们位于中间。 我在 API 文档中找不到任何关于此的信息。 Here是一个 jsFiddle 测试。 最佳答案 在 highcharts api 中,您
左旋转进位和右旋转进位指令有哪些实际用途? 在我的汇编课上,我们无法想出一个有用的好例子。 最佳答案 如果您想将位从一个操作数移出并移入另一个操作数: SHL EAX, 1 ; mov
我有一个查询,它使用 eqjoin 从两个不同的表返回以下数据。我想将 left 和 right 结合起来,而不是执行 zip() (重写 name > 和 joined_at),我想将右侧对象的属性
我使用 firebase API。发送和检索消息。但是,我在尝试为发送者/检索者设置布局时遇到麻烦,以便消息将左/右对齐。目前我只有发送者/检索者都使用的一种布局,但不确定如何设置不同的布局。 pub
我的菜单基本上是一个水平项目滑动条。所有菜单项都有特定的默认 CSS 属性。我希望这些项目在到达主容器的中心时更改其大小和左/右边距,并在离开主容器(或位于主容器之外)时重置为默认值。请参阅我的原理图
我有一个引用表,在这个表中有 3 个字段(Id、User1、User2)。 User2 字段可以为空,但我们在不使用时使用 0。 当我执行下面的 Linq 查询时,User2 == 0 的记录不是结果
不知道如何解决这个问题。 我有两个表结果和受访者 我需要查明受访者表中是否有任何行具有completion =“Complete”,但它们的respondent_id(在结果表和受访者表中)不在结果表
我正在尝试访问三个表以获得类似这样的内容: +------+------+------+ | ITEM | PCS | CSS | +------+------+------+ | 1099 |
left 和 right join 有区别吗,下面的sql 语句结果一样,但是两者的性能是一样的吗? SELECT count(*) FROM writers RIGHT JOIN blogs O
当我使用 LEFT() 使用以下代码从数据库中获取值时 $select="SELECT LEFT(description,500) FROM tbl_news where id='$id'"; $qu
当我将鼠标悬停在水平导航菜单上的页面名称上时,相关子页面会 float 在下方。 目前这些显示居中,我如何对齐它们以便它们向左对齐(与导航菜单标题名称一致)。 你可以去看到这个 http://79.1
在下面的引导网格示例中,它使用 col-sm 和 col-sm-push/pull。col-sm-push 指定了左/右值(偏移量)。 我不太清楚它是如何工作的。 第二个 float 元素来到第一个
我是一名优秀的程序员,十分优秀!