Thanks for updating us
this approach also enables me to update other tables (as other property pf My Entity).
on one of the questions posted here updating multiple rows using JPA , the second option which uses a named Query to update seems to be faster.
Using UPDATE STATISTICS WITH FULLSCAN will scan the entire table.
3) Rebuilding an index, for example by using the ALTER INDEX …
Using the INDEX option will update index statistics only.
2) By default, the UPDATE STATISTICS statement uses only a sample of records of the table.
So depending on your maintenance jobs and scripts several scenarios can exist.
His blog can be found at he can also be reached on twitter at @Benjamin Nevarez.Run again the query to verify that a new statistics object for the Product ID column has been created.Notice the value of the auto_created column which tells if the statistics were automatically created by the query processor.Let me show you how these commands work with some examples using the Adventure Works database. Sales Order Detail Use the previous sys.stats query to verify that two statistics objects were created, one for the Sales Order ID column and another one for the Order Qty column (they both have names starting with _WA_Sys as shown later).
Run the following statement to create an index on the Product ID column.
One of the questions I was asked recently while speaking at the Los Angeles SQL Server Professionals Group and the Orange County SQL Server User Group (*) was regarding the order in which jobs like rebuilding indexes or updating statistics should be executed as part of the database maintenance activities.