Tag: partitions

Przydatne skrypty, SQL Server

Partycje i ich granice

Thanks to https://sqlity.net/en/1031/partitions-boundaries-filgroups/     SELECT f.NAME AS file_group_name, SCHEMA_NAME(t.schema_id) AS table_schema, t.name AS table_name, p.partition_number, ISNULL(CAST(left_prv.value AS VARCHAR(MAX))+ CASE WHEN pf.boundary_value_on_right = 0 THEN ’ < ’ ELSE ’ <= ’ END , ’-INF < ’) + 'X’ + ISNULL(CASE WHEN pf.boundary_value_on_right = 0 THEN ’ <= ’ ELSECzytaj dalej / Read more

Administracja, Development, SQL Server

TRUNCATE tylko części danych? Challenge accepted!

UWAGA Artykuł pochodzi z czasów, gdy nie istniało polecenie TRUNCATE TABLE WITH PARTITIONS . Dlatego został on nieco zmodyfikowany, odpowiednie komentarze prostują sytuację ;] Z dokumentacji technet: https://msdn.microsoft.com/pl-pl/library/ms189461%28v=sql.110%29.aspx Partitioning data enables you to manage and access subsets of your data quickly and efficiently while maintaining the integrity of the entire dataCzytaj dalej / Read more