programmer group

Common types conversion of golang

** 1.Type(expression): ** int( time.Now (). Weekday()) // week to int int( time.Now (). Month ()) // month to int var a float64 a = 3.1 B: = int (a) // float64 to int var a int a = 1 B: = Int64 (a) // int to Int64 ** 2. Strconv package: ** String and int, int32, Int64: i, _ := strconv.Atoi (s) // string to int s := strconv.Itoa (i) // int to string i, _ := strconv.ParseInt (s, 10, 32) // string to int32 ii := int32(i) i, _ := ...

programmer group

The method of querying the last rebuild time of SQL Server index

A friend has a job whose execution of rebuild index has stopped. He asked me if I could check which indexes have been rebuilt. I thought Sys.index perhaps Sys.objects Similar information will be stored and not found.  Check from the Internet, SQL server does not store similar information. But because rebuild index will update statistics automatically, the update time of statistics can be obtained. So we can estimate it roughly...

programmer group

SQL statement to query index usage

SELECT sch.name + '.' + t.name AS [Table Name], i.name AS[Index Name], i.type_desc, ISNULL(user_updates,0) AS [Total Writes], ISNULL(user_seeks +user_scans + user_lookups,0) AS [Total Reads], s.last_user_seek, s.last_user_scan , s.last_user_lookup, ISNULL(user_updates,0) - ISNULL((user_seeks+ user_scans +user_lookups),0)AS [Difference], p.reserved_page_count * 8.0 / 1024 as SpaceInMB FROM sys.indexes...

onezero.medium.com onezero.medium.com

Don’t Miss Index, Medium’s New Publication About Work

OneZero readers know it well: The very concept of “work” is changing thanks to colossal technological shifts that have only accelerated as a result of the Covid-19 pandemic. Remote positions, precarious gig jobs, and side hustles are now cornerstones of our new economy.Which is why Medium is launching Index, a new publication about work.As Index editor Jean-Luc Bouchard puts it in their welcome letter:Jobs have increasingly...