• Manufacturer of query service based on vbs


    A netizen asked: select * from win32_ Service can check the service name and status But I want to check whether the manufacturers of this service, such as Microsoft and Agricultural Bank of China, are still unknown?? What is this attribute? Thank you I found something visible in msconfig, but I couldn’t extract it The […]

  • SQL query the information of the students with the best scores in each subject


    1. Relevant data sheet Score table [user] tableThe SQL statement is as follows: Copy codeThe code is as follows: –Find out the information of the students with the best scores in each subject–Self connection–Select top 1 * from score b where b.scorename = ‘Math’ order by b.score desc SELECT A.ID,U.Name,A.ScoreName,A.Score FROM Score A,[User]U WHERE UID IN […]

  • How to view the running time of MySQL statements through query profiler


    The last article introduced two methods to check the running time of MySQL statements. Today, I will continue to introduce you to check the running time of MySQL statements. Interested friends can learn together! Query profiler is a query diagnosis and analysis tool of MySQL. It can analyze where the performance bottleneck of an SQL […]

  • Bootcfg configure, query, or change boot.ini file settings


    Bootcfg configuration, query or change   Boot.ini   File settings. To view the command syntax, click the following command: bootcfg addsw Adds an operating system load option for the specified operating system item. grammarbootcfg /addsw [/s Computer [/u Domain\User /p Password]] [/mm MaximumRAM] [/bv] [/so] [/ng] /id OSEntryLineNum parameter/s Computer  Specify the remote computer name or   IP   Address (backslash is not allowed). The default is the local computer.  /u Domain\User  […]

  • Understand MySQL query optimization process


    MySQL query optimization needs three steps: parsing, preprocessing and optimization. In these processes, errors may occur. This article will not discuss error handling in depth, but will help you understand how MySQL executes queries so that you can write better query statements. Parser and preprocessor At the beginning, the MySQL parser split the query into […]

  • Mybatis implementation of SQL query interception modification


    preface One of the functions of interceptors is that we can intercept the calls of some methods. We can choose to add some logic before and after the execution of these intercepted methods, or we can execute our own logic when executing these intercepted methods instead of executing the intercepted methods. An original intention of […]

  • Three methods of querying SQL server startup time


    In the morning, I’m analyzing the usage of the index. I want to see when the database was started to ensure that there is no problem with the statistical data. I can use the following three methods to query: –2008 and later SELECT sqlserver_start_time FROM sys.dm_os_sys_info select crdate from master..sysdatabaseswherename=’tempdb’ SELECT login_time FROMsysprocesses WHEREspid= 1

  • 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 […]

  • SQL statement query SQL server server name and IP address


    Get server name: SELECT SERVERPROPERTY(‘MachineName’) select @@SERVERNAME select HOST_NAME() Get IP address can use XP_ Cmdshell executes ipconfig command: –Open XP_ cmdshell exec sp_configure’show advanced options’, 1 reconfigure with override exec sp_configure’xp_cmdshell’, 1 reconfigure with override exec sp_configure’show advanced options’, 0 reconfigure with override go begin declare @ipline varchar(200) declare @pos int declare @ip varchar(40) […]

  • SQL statement query SQL server memory usage


    Select type, – type of clerk sum(virtual_ memory_ reserved_ kb)as vm_ Reserved_ KB, – reserved memory sum(virtual_ memory_ committed_ kb)as vm_ Committed_ KB, – committed memory sum(awe_ allocated_ kb)as awe_ Allocated_ KB, – memory used after awe is turned on sum(shared_ memory_ reserved_ kb)as sm_ Reserved_ KB, – shared reserved memory sum(shared_ memory_ committed_ kb)as […]

  • 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 AS i WITH (NOLOCK) LEFT OUTERJOIN sys.dm_db_index_usage_statsAS s WITH (NOLOCK) ON s.object_id […]

  • Example of using query generator query() in yii2 framework


    This article describes the use of query generator query () in yii2 framework. The details are as follows: Yii / db / query in yii2 provides us with rich methods to build complex SQL statements. The biggest difference between query () and create command is that the latter directly uses the SQL statements we have […]