[Sqlalchemy-tickets] Issue #4059: SQL Server reflects an implicit "heap" index (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: Michael B. <iss...@bi...> - 2017-08-30 15:57:58
|
New issue 4059: SQL Server reflects an implicit "heap" index https://bitbucket.org/zzzeek/sqlalchemy/issues/4059/sql-server-reflects-an-implicit-heap-index Michael Bayer: not sure if this is SQL server 2017 only, or 2016 forward, have not seen this with earlier testing: ``` #!python from sqlalchemy import * e = create_engine("mssql+pymssql://scott:tiger^5HHH@mssql2017:1433/test", echo=True) c = e.connect() c.execute("drop table if exists foo") c.execute(""" create table foo ( d1 integer, d2 integer ) """) c.execute("create index food1 on foo(d1)") insp = inspect(e) print insp.get_indexes("foo") ``` output: ``` #!python [{'unique': False, 'name': None, 'column_names': []}, {'unique': False, 'name': u'food1', 'column_names': [u'd1']}] ``` that name=None is a heap index that is implicit, see https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql |