qb icon indicating copy to clipboard operation
qb copied to clipboard

Indexes are not being created for Memory Optimized tables on SQL Server

Open Daemach opened this issue 4 years ago • 2 comments

I'm trying to create indexes via both schema.create() and schema.alter() and neither are appearing in SQL Server. I don't even see attempts in fusion reactor. In this case I want to index every column in a view (long story), but nothing...

var columns = queryexecute("select top 1 * from vw_esg_data").columnlist();

schema.alter( "mars_in_custom_esg_data", function( table ) {
  columns.each((column)=>{
    table.index( [ column ], "idx_#column#_mars_in_custom_esg_data" );
  })
} );

I also tried this, but nothing there either (which method is better, btw?):

var columns = queryexecute("select top 1 * from vw_esg_data").columnlist();
columns.each((column)=>{
  schema.alter( "mars_in_custom_esg_data", function( table ) {
      table.index( [ column ], "idx_#column#_mars_in_custom_esg_data" );
  } );
})

And again, the indexes aren't showing up when creating new tables either. PK indexes for 'increments' columns are, but no custom indexes. And no error messages.

Daemach avatar Feb 14 '21 15:02 Daemach