azure-sql-server

How to set Azure SQL to rebuild indexes automatically?

限于喜欢 提交于 2019-12-03 09:23:15
问题 In on premise SQL databases, it is normal to have a maintenance plan for rebuilding the indexes once in a while, when it is not being used that much. How can I set it up in Azure SQL DB? P.S: I tried it before, but since I couldn't find any options for that, I thought maybe they are doing it automatically until I've read this post and tried: SELECT DB_NAME() AS DBName ,OBJECT_NAME(ps.object_id) AS TableName ,i.name AS IndexName ,ips.index_type_desc ,ips.avg_fragmentation_in_percent FROM sys

Azure SQL Server Elastic Pool - automatically add database to pool

℡╲_俬逩灬. 提交于 2019-12-01 05:13:55
Currently we have an Azure SQL Server and each time we create new web app, we use EF Core Code First to generate the database. However after the database is created we manually go to Azure portal and add the newly created database to the Elastic Pool inside the Azure SQL Server. Is it possible to somehow automate the process so that each newly created database either via portal or generated using EF or whatever, it will be automatically added to the Pool? You can use Transact-SQL to programmatically move an existing Azure SQL Database into an elastic pool. ALTER DATABASE db1 MODIFY ( SERVICE

Using Polybase to load data into an existing table in parallel

可紊 提交于 2019-12-01 01:26:23
Using CTAS we can leverage the parallelism that Polybase provides to load data into a new table in a highly scalable and performant way. Is there a way to use a similar approach to load data into an existing table? The table might even be empty. Creating an external table and using INSERT INTO ... SELECT * FROM ... - I would assume that this goes through the head node and is therefore not in parallel? I know that I could also drop the table and use CTAS to recreate it but then I have to deal with all the metadata again (column names, data types, distributions, ...). You could use partition