Posts

Showing posts with the label Predicate

SQL Server, the Predicate and the Residual Predicate property of the Execution Plan

Image
Hi Guys, Welcome to this blog! This time we will talk about the predicate and the residual predicate . Are you sure you know everything? ...otherwise you should invest a few minutes to read this post! We will use the Management Studio (SSMS) to take a look at the execution plan of which, as usual, we always try to learn something new.  So.. Enjoy the reading mate!   Predicate and the Residual Predicate This time we start by in this way! Suppose we have a table: a table with a field ID integer and with an identity.  The Id field is also the primary key. The same table has a datedoc field in datetime format and a field customer_name of type Varchar. CREATE TABLE ORDTES ( ID INT identity (1,1) PRIMARY KEY CLUSTERED , DATEDOC datetime , CUSTOMER_NAME varchar (80) )  We have used this structure many times in previous posts. Now suppose we need to search for a row of this table by datedoc and then by customer_name. If this sear...