Skip to content

Commit

Permalink
Improve index for dates filter
Browse files Browse the repository at this point in the history
  • Loading branch information
paul_calderon committed Nov 2, 2022
1 parent 7918ff9 commit d1fd5e4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions FormAndList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
<None Include="Providers\DataProviders\sqldataprovider\06.00.03.sqldataprovider" />
<Content Include="Providers\DataProviders\sqldataprovider\06.00.04.sqldataprovider" />
<Content Include="Providers\DataProviders\sqldataprovider\06.05.07.sqldataprovider" />
<Content Include="Providers\DataProviders\sqldataprovider\06.05.08.sqldataprovider" />
<None Include="Providers\DataProviders\sqldataprovider\uninstall.sqldataprovider" />
<Content Include="ShowXml.ashx" />
<Content Include="web.config" />
Expand Down
7 changes: 6 additions & 1 deletion FormAndList.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DNN_UserDefinedTable" type="Module" version="06.05.07">
<package name="DNN_UserDefinedTable" type="Module" version="06.05.08">
<friendlyName>Form and List</friendlyName>
<description>Create a simple form or a view of repetitive and simple data.</description>
<iconFile>desktopmodules/userdefinedtable/icon_fnl_32px.gif</iconFile>
Expand Down Expand Up @@ -125,6 +125,11 @@
<name>06.05.07.sqldataprovider</name>
<version>06.05.07</version>
</script>
<script type="Install">
<path>providers\dataproviders\sqldataprovider</path>
<name>06.05.08.sqldataprovider</name>
<version>06.05.08</version>
</script>
<script type="UnInstall">
<path>providers\dataproviders\sqldataprovider</path>
<name>uninstall.sqldataprovider</name>
Expand Down
26 changes: 26 additions & 0 deletions Providers/DataProviders/sqldataprovider/06.05.08.sqldataprovider
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
 /************************************************************/
/***** SqlDataProvider *****/
/***** Install/Upgrade for UserDefinedTable 6.5.8 *****/
/***** *****/
/***** *****/
/***** Note: To manually execute this script you must *****/
/***** perform a search AND replace operation *****/
/***** for {databaseOwner} AND {objectQualifier} *****/
/***** or use 'SQL' FROM Host Menu AND run this. *****/
/***** *****/
/***** *****/
/************************************************************/

//Improve index for search with dates

IF EXISTS (SELECT Name FROM sys.indexes WHERE Name = 'IX_{objectQualifier}UserDefinedRows')
BEGIN
CREATE NONCLUSTERED INDEX [IX_{objectQualifier}UserDefinedRows] ON {databaseOwner}[{objectQualifier}UserDefinedRows] ([ModuleId],[CreatedAt])
WITH(DROP_EXISTING = ON)
END
ELSE
BEGIN
CREATE NONCLUSTERED INDEX [IX_{objectQualifier}UserDefinedRows] ON {databaseOwner}[{objectQualifier}UserDefinedRows] ([ModuleId],[CreatedAt])
WITH(DROP_EXISTING = OFF)
END
GO

0 comments on commit d1fd5e4

Please sign in to comment.