MySQL查询优化?(MySQL Query Optimization?)
所以我有一个约500万行的
DB
,我正在尝试优化加载时间。 我的数据库已经根据我的想法优化了列和索引,所以我假设它的查询。 此查询在包含约500万行的表上运行并返回其中的40 行 ,但需要101秒。如果我删除
timezone
转换,则相同的查询需要0.0015秒,但由于时区差异,会返回略有不同的结果。 我如何优化以更快的速度获得正确的结果?SELECT *, date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) as `timezoneDate` FROM `transactions` WHERE `isValid` = X AND `storeID` = X AND date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) >= '2014-11-19' AND date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) <= '2014-11-25' ORDER BY `eventDate`
此外,如果之前不清楚,我转换为第二个时区的变化取决于用户,所以现在它的America / New_York与美国/东方相同,但它会发生变化。
So I have a
DB
with ~5 million rows and I am trying to optimize the load times. My DB has columns and indexes as optimized as I can think so I assume its the query. This query runs on a table with ~5 million rows and returns 40 of them, but it takes 101 seconds.If I remove the
timezone
conversions the same query takes 0.0015 seconds but returns slightly different results because of the timezone difference. How could I optimize to get the correct results with more speed?SELECT *, date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) as `timezoneDate` FROM `transactions` WHERE `isValid` = X AND `storeID` = X AND date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) >= '2014-11-19' AND date(CONVERT_TZ(eventDate, "US/Eastern", "America/New_York")) <= '2014-11-25' ORDER BY `eventDate`
Also if it was not clear before, the second timezone I am converting to changes depending on user, so right now its America/New_York which is the same as US/Eastern but it changes.
原文:https://stackoverflow.com/questions/33349699
最满意答案
Unity NuGet软件包版本3.5.1404不支持通用Windows项目。
它确实支持Windows Phone Silverlight项目。
如果您创建Windows Phone Silverlight项目,则可以将Unity NuGet包安装到其中。
The Unity NuGet package version 3.5.1404 does not support Universal Windows Projects.
It does support Windows Phone Silverlight projects.
If you create a Windows Phone Silverlight project you can install the Unity NuGet package into it.
相关问答
更多-
Windows Phone 8 Silverlight是Windows Phone 8上的旧版UI。WinRT XAML用于Windows应用商店应用(这些是通用应用)。 Windows Phone 8.1 Silverlight与此处解释的有点不同。 Windows Phone尽管年龄较大,但Silverlight在某些方面更好。 如果您的目标是开发一款仅针对手机的应用程序,并且没有任何用于Win8 / RT的用途,请使用Silverlight。 背景音频在WinRT中是一团糟。 语音识别与Cortana ...
-
如何在Windows Phone 8.1中实现openstack swift API(how to implement openstack swift API in windows phone 8.1)[2023-10-27]
在这些步骤之后,我已经与windows phone 8.1建立了openstack swift连接:1。将newtonsoft.json版本 - 6.0.2添加到您的项目中。 2.然后添加openstack-sdk-dotnot引用。 3.添加这些引用后使用此代码“ openstack swift dotnet api仅支持v2.0,所以请记住 ” try { var authUri = new Uri("http://localhost:5000/v2.0" ... -
LightInject NuGet包已更新,以支持Windows Phone 8.1。 这将尽快发布到NuGet官方订阅源。 最好的问候Bernhard Richter(LightInject的作者) The LightInject NuGet packages has been updated to support Windows Phone 8.1. This will be published to the official NuGet feed as soon as possible. Best r ...
-
这在我的开发盒上工作正常。 这是我的NuGet包管理器在WP8项目上的输出: PM> Install-Package NdefLibrary You are downloading NdefLibrary from Andreas Jakl, the license agreement to which is available at https://ndef.codeplex.com/license. Check the package for additional dependencies, which ...
-
是的。 Windows Phone Silverlight 8是Windows Phone 8.1发布后给予Windows Phone 8的名称。 还有Windows Phone Silverlight 8.1和Windows Phone 8.1 。 这两者之间的区别在于Windows Phone 8.1与Windows应用商店应用兼容,而Windows Phone Silverlight 8.1不兼容。 你可以在这里了解更多关于这个: http : //msdn.microsoft.com/en-us/l ...
-
好吧,现在看来Parse现在也支持.NET,完全支持.net framework 4.5。 Well, It seems now that Parse is now also supporting .NET with full support to .net framework 4.5.
-
根据此主题, Placeholdertext仅适用于WP 8.1 Universal(RunTime)应用程序。 确保您的不是WP Silverlight应用程序。 希望能帮助到你! According to this thread Placeholdertext is only applicable for WP 8.1 Universal (RunTime) apps. Make sure that yours is not a WP Silverlight app. Hope it helps!
-
根据NuGet文档(请参阅“通用框架和配置文件定位示例”部分),您需要向目标添加wpa才能使其正常工作。 请注意, wpa目标仅适用于NuGet 2.8.1+ 这些相同的配置文件目标是用于便携式配置文件目标中的项目的目标。 According to NuGet documentation (please take a look here at "Common Framework and Profile Targeting Examples" section) you need to add wpa to y ...
-
Unity NuGet软件包版本3.5.1404不支持通用Windows项目。 它确实支持Windows Phone Silverlight项目。 如果您创建Windows Phone Silverlight项目,则可以将Unity NuGet包安装到其中。 The Unity NuGet package version 3.5.1404 does not support Universal Windows Projects. It does support Windows Phone Silverligh ...
-
我试着寻找那个特定的NuGet包,我发现的是这个: 好像它只支持WPF,Silverlight和Windows Phone 7.它也是在2011年发布的,所以很可能它甚至不支持Windows 8。 I tried looking for that specific NuGet package and what I found is this: Seems like it only supports WPF, Silverlight and Windows Phone 7. Also it was publi ...