Changes in dimension table column indexes generation.
- Indexes for dimension table columns are generated only if there are more than one non-PK columns.
This commit is contained in:
parent
6ce2d56252
commit
089ce59f20
@ -48,7 +48,7 @@ dimensionTableDefnSQL table@Table {..} = do
|
||||
tablePKColName = head [ cName | PrimaryKey cName <- tableConstraints ]
|
||||
nonPKColNames = [ cName | Column cName _ _ <- tableColumns, cName /= tablePKColName ]
|
||||
indexSQLs = [ "CREATE INDEX ON " <> tabName <> " (" <> cName <> ")"
|
||||
| cName <- nonPKColNames ]
|
||||
| cName <- nonPKColNames, length nonPKColNames > 1 ]
|
||||
(++ indexSQLs) <$> tableDefnSQL table
|
||||
|
||||
factTableDefnSQL :: Fact -> Table -> Reader Env [Text]
|
||||
|
Loading…
Reference in New Issue
Block a user