Solution for Slow logon via Remote Desktop to Server 2012: Disable the Large Send Offload

Recently, I found it became very slow when I am logging onto my development VM, a windows server 2012R2 instance through Remote Desktop. There are many kinds of solutions in Google's search results. I tried many of them and found only this one suits me.

On the Windows Server 2012 machine, disable the Large Send Offload via the following steps:

Open Network Connections. 
Click Change adapter settings
Right-click the icon of the Network card and select Properties.
In Networking tab, click Configure… button.
In the next window, switch to Advanced tab.
Click the Large Send Offload Version 2 (IPv4) and change the value to Disabled.
Click the Large Send Offload Version 2 (IPv6) and change the value to Disabled.

Your RDP connection will disconnect right away after you apply the change. Don't worry, connect it back and you will find the annoying delay disappears!

Reference

CTE 101

Today I first learnt the concept of CTE (Common Table Expression) from my colleague Rod. Basically, CTE can be used to improve the readability of your long and complex SQL statement.

for example, without CTE, you might write the following SQL:

CREATE OR REPLACE VIEW dfx.test_vw123 AS
SELECT 
	a.FIELD_A, 
	a.FIELD_B, 
	b.FIELD_C
	b.FIELD_D
FROM (
	SELECT 
		MAX(FIELD_A) AS FIELD_A, 
		COUNT(*) AS FIELD_B 
	FROM TABLE_A ta 
	WHERE ta.FIELD_E = 'General' 
	GROUP BY ta.FIELD_F
) a 
LEFT JOIN TABLE_A b 
ON a.FIELD_A = b.FIELD_A

with CTE, you could write the following one with better readability.

CREATE OR REPLACE VIEW dfx.test_vw123 AS
WITH TABLE_A_STATS AS (
	SELECT 
		MAX(FIELD_A) AS FIELD_A, 
		COUNT(*) AS FIELD_B 
	FROM TABLE_A ta 
	WHERE ta.FIELD_E = 'General' 
	GROUP BY ta.FIELD_F
)
SELECT 
	a.FIELD_A, 
	a.FIELD_B, 
	b.FIELD_C
	b.FIELD_D
FROM TABLE_A_STATS a 
LEFT JOIN TABLE_A b 
ON a.FIELD_A = b.FIELD_A;

For further information about CTE, click Reference
I also found another article about CTE in Chinese.

读书笔记:也许你该找个人聊聊

也许你该找个人聊聊

洛莉·戈特利布

序:當痛苦可以被言説

2022-01-07 23:23:04

你沒法逃避痛苦,只能承認。

2022-01-07 23:24:15

但最根本的辦法,説來説去只有一個,就是誠實。誠實地承擔來訪者遭遇的無常,也誠實接受自己哪怕有此覺悟,仍會有無法負擔之重。

2022-01-08 23:20:49

我們改變不了問題,但我們可以改變對問題的態度。或者説,只要能夠看到問題的存在,就已經改變了面對問題的態度

2022-01-08 23:21:30

洛莉的故事,所有人的故事,説到底都是同一件事——我們無法逃避痛苦,只能承認。

2022-01-08 23:41:35

不要心存幻想。這個世界沒有奇跡。你無法逃避你所遇到的痛苦,心理學也不能提供任何幻想,但不要忘了,世界上也有這樣的地方,有這樣一些人,可以直面這個無處可逃的、困惑的、痛苦的你。你們坐在一起,隨便談談。你可以言説真實的你,而這就是心理咨詢的奇跡所在。

…more

Don't look up

I watched this movie with Eric on 31-Dec-2021. I actually have watched it once by myself several days ago. I would say that it's a typical fast-paced modern movie. It tries to convey many things in two hours. Everyone can tell that it is an imaginary story, but it is sort of real on the other hand.

Personally, I think it is a good movie, this is why I watched it twice in a short time. But I don't like this type of movie very much. Unfortunately, we will see more and more similar movies in the future. The storytellers know what we, human beings want to watch, so most of them choose to put lots of fetching plots into a movie.

Microsoft Wubi (微软五笔) is good

I use the Wubi-pinyin input method on macOS and Linux systems by installing the Rime input method framework. On a Windows system, Rime is also available if you have the Administrator privilege. Unfortunately, I am only a standard user on my laptop at work. So I have to find a not-bad alternative and the built-in Microsoft Wubi looks like a good choice.

It actually tastes delicious. No compatible issue, it is Wubi-pinyin compatible, and very fast. The only thing I might complain about is that you cannot press Enter key to send out the code you input onto the screen, but pressing the Shift key twice did the trick.

In total, it is a good choice, and most importantly, it is built-in.