连接中的条件顺序是否会影响查询性能?(does the order of condition in join affect query performance?)
我正在写一些
SQL
,脑子里出现了一个问题。
SQL
是这样的:select t1.column1, t2.column2 from table1 t1 inner join table2 t2 on t1.keyA = t2.keyA where t1.name = 'kim kardashian'
on
子句中的顺序是否会影响SQL
性能?
on t1.keyA = t2.keyA
和on t2.keyA = t1.keyA
没有区别?无论顺序如何,
SQL
结果都是相同的。I'm writing some
SQL
and a question appeared in my mind.
SQL
is like this:select t1.column1, t2.column2 from table1 t1 inner join table2 t2 on t1.keyA = t2.keyA where t1.name = 'kim kardashian'
Does the order in
on
clause affectSQL
performance?
on t1.keyA = t2.keyA
andon t2.keyA = t1.keyA
is no difference?Result of the
SQL
is same regardless the order.
原文:https://stackoverflow.com/questions/49008906
最满意答案
这不是Microsoft推荐的,但可以同时使用两者。 理想情况下,您只需将完整的州名添加到数据集中。
="#STATENAME" & " - " & Fields!Count.Value
This is not recommended by Microsoft, but you can use both at the same time. Ideally you would simply add the full State names to your dataset.
="#STATENAME" & " - " & Fields!Count.Value
相关问答
更多-
这不是Microsoft推荐的,但可以同时使用两者。 理想情况下,您只需将完整的州名添加到数据集中。 ="#STATENAME" & " - " & Fields!Count.Value This is not recommended by Microsoft, but you can use both at the same time. Ideally you would simply add the full State names to your dataset. ="#STATENAME" & " ...
-
ORACLE PL / SQL中是否有函数来计算多边形的面积?(Is there a function in ORACLE PL/SQL to calculate the area of a polygon?)[2023-06-04]
下面的函数返回GEOMETRY的区域,它也适用于包含带孔的多边形的任何多边形。 SELECT SDO_GEOM.SDO_AREA(, ) FROM ; TOLERANCE_VALUE用于将精度等级与空间数据相关联。 详情请参阅此处 。 The below function return the area of the GEOMETRY also it works with any polygon i ... -
在不使用gpclib工具的情况下将空间多边形转换为常规数据框(Converting spatial polygon to regular data frame without use of gpclib tools)[2022-05-08]
您还需要安装rgeos软件包。 当加载rgeos并且未安装rgeos ,会显示以下消息: > require("maptools") Loading required package: maptools Checking rgeos availability: FALSE Note: when rgeos is not available, polygon geometry computations in maptools depend on gpclib, which has a ... -
如何创建一个多边形并使其与R中的空间数据进行坐标(how to create a polygon and get it coordinates with spatial data in R)[2023-10-09]
问题已经更新,所以也许我现在更好地了解目标。 您想要绘制具有大量边界的区域,然后单击顶部的多边形? 使用注释中提供的shape文件,您可以执行以下操作: library(spatstat) library(sp) library(maptools) obj <- readShapeSpatial("mun_lin.shp") region <- unmark(as(obj, "psp")) x11() # Necessary when using RStudio (at least on my machi ... -
我无法说出为什么你的代码没有产生输出 - 有太多可能的原因 - 但这是你想要实现的吗? 码 library(rgdal) library(ggplot2) library(plyr) library(RColorBrewer) setwd("< directory with all your files >") map <- readOGR(dsn=".",layer="ALRIS_tigcounty") marriages <- read.csv("marriages.2012.csv",h ...
-
如何用空间多边形作为列表数据类型创建R中的地图(How to create map in R from spatial polygon given as list data type)[2023-07-22]
如果你只是想绘制地图,你可以使用ggplot。 我无法测试这个,因为我没有你的数据,但应该工作。 library(ggplot2) aux_df <- data.frame(aux3) # as per comment: the list-to-dataframe conversion prepends the column names with X ggplot(aux_df, aes(x=X_X, y=X_Y, group=X_ID) + geom_polygon(color='black', f ... -
是的,虽然我没有仔细检查你的语法,但这应该有效。 Yes, although I haven't closely checked your syntax, that should work.
-
您将需要使用带有'CONTAINS'掩码的SDO_CONTAINS或SDO_RELATE 请参阅位于的文档 SDO_CONTAINS http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_operat.htm#sthref1064 for 要么 SDO_RELATE http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_operat.htm#i785 ...
-
R中的多边形地图(空间数据)(Polygon Maps in R (spatial data))[2021-09-03]
@Yun Zhou:看起来你是从点数据开始的。 我相信您首先需要将数据帧转换为SpatialPointsDataFrame,然后才能将点转换为多边形数据(或某些密度函数)。 #dataframe from csv df.in # Coerce to SpatialPointsDataFrame coordinates(df.in) = c("latitude", "longitude") class(df.in) #it should be a sptial points data frame plot ... -
遗憾的是,目前无法运行此查询 - 除非您愿意简化应用程序(即假设所有多边形都是特定半径的圆[或小半径])。 您所描述的功能有一个开放票: https : //jira.mongodb.org/browse/SERVER-2874 Unfortunately, there is no way to run this query at present -- unless you're willing to simplify the application (i.e., assume all polygons a ...