text:
THE SQL Server Blog Spot on the Web
I started blogging about SQL Server here at SQLblog back in July, 2009 and it was a lot of fun, I enjoyed it a lot. Then later, after a series of blog posts about the Query Optimizer, I was invited to write an entire book about that same topic. But after a few months I realized that it was going to be hard to continue both blogging and writing chapters for a book, this in addition to my regular day job, so I decided to stop blogging for a little while.
Now that I have finished the last chapter of the book and I am working on the final chapter reviews, I decided to start blogging again. This time I am moving my blog to
Same as my previous posts I plan to write about my topics of interest, like the relational engine, and basically anything related to SQL Server. Hopefully you find my new blog interesting and useful.
Finally, I would like to thank Adam for allowing me to blog here.
I'll be presenting a session at SQLSaturday #44 in Huntington Beach, the first SQLSaturday on Southern California. The event takes place on Saturday, April 24 at the Golden West College on 15744 Goldenwest St, Huntington Beach, CA 92647.
For more information visit the following link
My session is "How the Query Optimizer Works". I hope to see you there.
Last year when I presented my session regarding the Query Optimizer at the PASS Summit and at a couple of local user groups, I was asked how the estimated CPU and I/O costs in an execution plan are calculated. Since Microsoft does not publish how these costs are calculated all I could say was that each operator cost depends on the operator algorithm and the cardinality estimation.
This time I am working on a related project and I thought that perhaps I could look into this again to show as an example. But since there are dozens of operators I decided to start with a simple one: the Clustered Index Scan operator. So I captured dozens of XML plans, used XQuery to extract their cost information and after some analysis I was able to obtain a basic formula for this specific operator.
To show this in an example, let us look at the largest table in AdventureWorks. Run the following query and look at the estimated CPU and I/O costs for the Clustered Index Scan operator
select * from Sales.SalesOrderDetail
where LineTotal = 35
For a Clustered Index Scan operator I observed that the CPU cost is 0.0001581 for the first record plus 0.0000011 for any additional record after that. In this specific case we have an estimated number of records of 121,317 so we can use 0.0001581 + 0.0000011 * (121317 – 1) or 0.133606 which is the value shown as Estimated CPU Cost. In a similar way, I noticed that the minimum I/O cost is 0.003125 for the first database page and then it grows in increments of 0.00074074 for every additional page. Since this operator scans the entire table I can use the following query to find the number of database pages, which returns 1,234.
select in_row_data_page_count, row_count
from sys.dm_db_partition_stats
where object_id = object_id('Sales.SalesOrderDetail')
and index_id = 1
In this case I have 0.003125 + 0.00074074 * (1234 – 1) or 0.916458 which is the value shown as Estimated I/O Cost.
Finally, we add both costs, 0.133606 + 0.916458 to get 1.05006 which is the total estimated cost of the operator. In the same way, adding the cost of all the operators will give the total cost of the plan. In this case, the cost of the Clustered Index Scan, 1.05006, plus the cost of the first Compute Scalar operator, 0.01214, the second Compute Scalar operator, 0.01213, and the cost of the Filter operator, 0.0582322, will give the total cost of the plan, 1.13256, as shown next.
Finally, you can combine this with my previous post, Fooling the Query Optimizer at http://sqlblog.com/blogs/ben_nevarez/archive/2010/01/13/fooling-the-query-optimizer.aspx, to test with "bigger" tables by changing the number of records and pages of a table for testing purposes.
Did you ever wanted to know which execution plans the Query Optimizer would generate for your queries should your tables have millions of records? You can actually generate those plans by using the undocumented ROWCOUNT and PAGECOUNT options of the UPDATE STATISTICS statement. These options can be used on small or empty tables and can be helpful for testing in some scenarios where you may not want to spent time or disk space creating big tables.
By using this method you are tricking the Query Optimizer as it will generate execution plans using cardinality estimations as if the table really had millions of records. Note that this option, available since SQL Server 2005, only helps in creating the execution plan for your queries. Actually running the query will use the real data and of course will execute faster than a table with millions of records.
UPDATE STATISTICS WITH ROWCOUNT, PAGECOUNT does not change the table statistics, only the counter of number of rows and pages of a table. But the Query Optimizer uses this information to estimate the cardinality of queries as I will show later. Also keep in mind that these are undocumented and unsupported options and should not be used in any production environment.
Let us see an example. Run the following query to create a new table on the AdventureWorks database
select * into dbo.Address
from Person.Address
Inspect the number of rows by running the following queries. It must show 19,614 rows.
select * from sys.partitions
where object_id = object_id('dbo.Address')
select * from sys.dm_db_partition_stats
where object_id = object_id('dbo.Address')
Run the following query
select * from dbo.Address
where city = 'London'
Running this query will create new statistics for the city column and will show the following plan. Note that the estimated number of rows is 434 and it is using a simple Table Scan operator
We can see where the Query Optimizer is getting the estimated number of rows by inspecting the statistics object. Run this query to see the name of the statistics object
select * from sys.stats
Then use the displayed statistics object name in the following statement (the name may be different in your case)
dbcc show_statistics('dbo.Address', _WA_Sys_00000004_46136164)
By looking at the histogram you can find the value 434 on EQ_ROWS for the RANGE_HI_KEY value 'London' (Statistics and histograms are explained on previous posts in this blog)
Now run the UPDATE STATISTICS WITH ROWCOUNT, PAGECOUNT (you can specify any other value for rowcount and pagecount)
update statistics dbo.Address with rowcount = 1000000, pagecount = 100000
If you inspect the number of rows again from sys.partitions or sys.dm_db_partition_stats, as shown previously, it will now show 1,000,000 rows. sys.dm_db_partition_stats also shows the new number of pages. Clear the plan cache and run the query again
dbcc freeproccache
Note that the estimated number of rows has changed from 434 to 22,127.1 and that a different plan was generated using this new cardinality estimation. The Query Optimizer decided to parallelize this plan. But this is a very simple query, more dramatic plan changes can happen with more complex queries.
After execution the actual number of rows obviously is still is 434 but the Query Optimizer is not able to see this value.
If you look at the statistics object again, using DBCC SHOW_STATISTICS as shown before, the histogram has not changed. One way to obtain the estimated number of rows shown in the new execution plan is calculating the percentage or fraction of rows for the value 'London' from the statistics sample, which in this case is 19,614, as shown on the header of the statistics object. So the fraction is 434 / 19,614 or 022127052. Then obtain the same percentage from the new "current" number of rows which is 1,000,000 calculated as 1,000,000 * 0.022127052 and we get 22,127.1 which is the estimated number of rows displayed in the plan.
Finally, drop the table you just created
drop table dbo.Address
I was looking at some metadata access today and this reminded me of when I talked about this topic two years ago at the PASS Summit in Denver.
Back in SQL Server 2000 most of the existing metadata was available to members of the public role, that is, to any login that can connect to the SQL Server instance. SQL Server 2005 promises that a user can only see the metadata of an object the user owns or has access to. This was a huge security improvement. However, some items were still left available to any user, which in some cases could be a security concern.
Let us test some of it. Create a new login called insecure without granting any permission to it. Connect as that user and see what kind of information from the server you are able to obtain. Try this first
select * from sys.databases
This new user is able to see the list of all the databases on the server, including the ones he does not have access to. Try
select * from sys.configurations
This time you can see some configuration information of your instance including some specific security information like if the 'c2 audit mode' is enabled.
Some other data available to any SQL Server user is information about the location of the files of the current database, linked servers or backup devices. Try these
select * from sys.database_files
select * from sys.servers
select * from sys.backup_devices
Here I am using catalog views only but the same applies if you use the SQL Server 2000 compatibility views (like sysdatabases). You can also execute some stored procedures like these to get similar information
sp_helpdb 'master'
exec sp_configure
exec sp_helpfile
exec sp_helpserver
exec sp_helpdevice
Now let us look at the msdb database. By looking at the following system tables (yes, these are called system tables) you can obtain all the information regarding backup and restore operations performed on your instance. You can obtain information like database names, location of databases files, locations of database backup files and names of users who performed these backups.
use msdb
select * from backupfile
select * from backupmediafamily
select * from backupset
select * from restorefile
select * from restorehistory
You can also run some extended stored procedures or functions like the following
exec master..xp_msver
select serverproperty('ProductVersion')
select serverproperty('IsIntegratedSecurityOnly')
For example, the first two display the version (build) of SQL Server, which can show if the database administrator has installed the latest service pack or security updates. This can reveal some known security vulnerability of your instance.
Perhaps you can see now that this information, like security configuration, database names, database file names, location of database backups, user names, etc. could be used by an attacker to get additional permissions or data.
Certainly these are the defaults and many of them can be changed to be more secure, but many times this is not practical as some tools and applications depend on these defaults. For example, you can revoke the VIEW ANY DATABASE permission (executed as member of sysadmin) to secure the information displayed on sys.databases.
revoke view any database to public
But now only database owners can see their databases listed on sys.databases. Of course, this is a problem for a valid user who is not a database owner, who will only see the master and tempdb databases on this list. To test, grant db_datareader permissions to the insecure user to any user database. Test this again connected as the insecure login
Only the master and tempdb databases are listed this time. One known issue of this configuration is that you can not use ODBC Data Source Administrator to create a new data source to connect to a database you have access to (unless you are the database owner)
Even Management Studio does not list all the databases you have access to (but you can use the USE statement)
But what is still ironic is that, even when you can not use ODBC Data Source Administrator or list your databases in Management Studio, you can still use db_name() to list all the database names anyway like in
select db_name(5)
Finally, note that a command introduced with SQL Server 2005, VIEW DEFINITION, could also help you to have more control on the access to SQL Server metadata.
Did you know that the Database Engine Tuning Advisor (DTA) uses the Query Optimizer to help you to create indexes, indexed views, and partitions for your databases? The DTA uses the Query Optimizer to estimate the cost of queries so it can select the choices with the lowest estimated cost. But, how can the Query Optimizer estimate the cost of a query using, for example, an index that does not exist yet?
Creating indexes on a DTA session could be very expensive and can create some other performance problems in your database. In addition to that, when the Query Optimizer uses indexes to estimate the cost of a query, it uses only the index statistics; it does not need to access the index data.
So, to avoid creating real indexes during a DTA session, SQL Server has a special kind of indexes called hypothetical indexes. Hypothetical indexes are not real indexes, they only contain statistics and can be created with the undocumented command CREATE INDEX WITH STATISTICS_ONLY. This command only creates the statistics for the index.
You may not be able to see these indexes during a DTA session because they are dropped automatically. But you can see the CREATE INDEX WITH STATISTICS_ONLY and DROP INDEX commands if you run Profiler to see what the DTA is doing. You can also create these indexes manually as I will show you later.
Hypothetical index have been available in previous versions of SQL Server where they were used by the DTA predecessor, the Index Tuning Wizard.
Let us take a quick tour to some of these concepts here. Create a new table on the AdventureWorks database
select *
into dbo.SalesOrderDetail
from sales.SalesOrderDetail
Copy the following query and save it to a file
select * from dbo.SalesOrderDetail
where ProductID = 897
Open a new DTA session. You can optionally run a Profiler session if you want to inspect what the DTA is doing. On workload file select the file containing the SQL statement that you just created. Specify AdventureWorks both for the database to tune and for the database for workload analysis. Click the Start Analysis button.
When the DTA analysis finishes run this query to inspect the contents of the msdb..DTA_reports_query table
select * from msdb..DTA_reports_query
Notice that the table contains some information like the query that was tuned and the current and recommended cost. The current cost, 1.2434, is easy to obtain by directly requesting an estimated execution plan for the query
Since the DTA analysis was completed, the needed hypothetical indexes were already dropped. In the next statement I will create the index recommended by the DTA, but instead of a regular index I will create it as a hypothetical index by adding WITH STATISTICS_ONLY.
create clustered index cix_ProductID on dbo.SalesOrderDetail (ProductID)
with statistics_only
You can validate that a hypothetical index and statistics were created by running this (notice that the index is defined as hypothetical on the index_description field)
sp_helpindex 'dbo.SalesOrderDetail'
select * from sys.stats
where object_id = object_id('dbo.SalesOrderDetail')
However, at the moment I am not aware of a way outside the DTA to ask the Query Optimizer to consider these hypothetical indexes on an estimated execution plan. So I am not able to see where the previous recommended cost is coming from.
Remove the hypothetical index by running this
drop index dbo.SalesOrderDetail.cix_ProductID
Implement the DTA recommendation this time as a regular clustered index
After implementing the recommendation and running the query, the clustered index is in fact being used by the Query Optimizer and this time the estimated cost I got was 0.0033652, very close to the recommended cost listed before on the msdb..DTA_reports_query.
Finally, drop the dbo.SalesOrderDetail table you just created.
Did you know that you can share read-only databases between several instances of SQL Server?
Scalable Shared Databases is a very interesting SQL Server feature that many of us seem to almost have forgotten about it. Available for the first time in SQL Server 2005 and originally described on the Microsoft KB article 910378, it was later fully documented on Books Online. This Enterprise edition-only feature allows a read-only database to be accessed at the same time by two or more SQL Server instances (maximum recommended is 8). This configuration offers some performance benefits by allowing each of these instances to use its own resources like memory, CPU, and tempdb database. Scalable Shared Databases are used as reporting databases.
The concept behind Scalable Shared Databases is very simple: you copy a detached database to a volume, configure that volume as read-only, and then you can attach this database by several SQL Server instances. A shared database will look like a regular read-only database in Management Studio.
By the way, it would be interesting to know if Microsoft plans to add additional functionality to this scalability feature or to extend it to read-write databases, perhaps something similar to what Oracle RAC is already doing.
For more details, especially on restrictions and configuration, see the 'Deploying a Scalable Shared Database' entry on Books Online.
I am excited that this is going to be my second time speaking at the PASS Summit. I have been attending PASS every year since 2003: a few times in Seattle, but also in Orlando (just after hurricane Jeanne), Dallas (just after hurricane Rita), and Denver.
My session, How the Query Optimizer Works, is scheduled for Wednesday, November 4, 1:30pm - 2:45pm, in room 201.
So, if you are attending PASS, I hope you can stop by my session or say hello at any of the PASS events.
This is the description of my session:
"The Query Optimizer is the component of SQL Server that attempts to determine the best way to execute a query by finding an efficient execution plan. This session will show you how a better understanding on how the Query Optimizer works and what information it needs to generate better execution plans, can help you to improve the performance of your databases. Learn about the high level structures of the Query Optimizer and some important factors that are considered during the optimization phase of query processing. See how you can provide SQL Server with appropriate statistics and indexes so it can perform better cardinality estimation and produce an efficient execution plan. Since the SQL Server Query Optimizer is a cost-based optimizer, this information will help it to better estimate the execution plan cost. Finally, although the Query Optimizer almost always selects a good enough execution plan for a query, it may not create an efficient plan for all the possible scenarios. See how you can troubleshoot these issues and how you can use other alternatives like hints or plan guides to force the query optimizer to produce a better execution plan."
Hope to see you there!
One of the questions I was asked recently while speaking at user groups, was regarding the order that jobs like rebuilding indexes or updating statistics should be performed as part of the database maintenance activities. Then I started writing this post about this topic on the weekend but was interrupted several times, including one of them to watch the premiere on VH1 of the movie Anvil: The Story of Anvil.
In general, the order should not matter, at least if you carefully consider these important points:
1) By default, the UPDATE STATISTICS statement uses only a sample of records of the table. Using UPDATE STATISTICS WITH FULLSCAN will scan the entire table.
2) By default, the UPDATE STATISTICS statement updates both index and column statistics. Using the COLUMNS option will update column statistics only. Using the INDEX option will update index statistics only.
3) Rebuilding an index, for example by using ALTER INDEX … REBUILD, will also update index statistics with the equivalent of using WITH FULLSCAN. Rebuilding indexes does not update column statistics.
4) Reorganizing an index, for example using ALTER INDEX … REORGANIZE, does not update any statistics.
So depending on your maintenance jobs and scripts several scenarios can exist.
The simplest scenario is if you want to rebuild all the indexes and update all the statistics. As mentioned before, if you rebuild all your indexes then all the index statistics will also be updated by scanning all the rows on the table. Then you just need to update your column statistics by running UPDATE STATISTICS WITH FULLSCAN, COLUMNS. Since the first job only updates index statistics and the second one only updates column statistics, it does not matter which one you execute first.
Some other more complicated scenarios include when you have a job which rebuilds your indexes depending on their fragmentation level. In these cases perhaps you want to update only those index statistics that were not touched by the index rebuild job, plus all the column statistics.
Of course, the worst case scenario would be if you first rebuild your indexes, which also updates the index statistics by scanning the entire table, and later you run UPDATE STATISTICS using the default values, which again updates the index statistics but this time with a default sample. Not only are you updating your index statistics twice but you are overwriting the better of the two choices.
Let me show you how these commands work with some examples using the AdventureWorks database. Create a new table dbo.SalesOrderDetail
select * into dbo.SalesOrderDetail
The next query uses the sys.stats catalog view and shows that there are no statistics objects for the new table.
select name, auto_created, stats_date(object_id, stats_id) as update_date from sys.stats
Use this query again to inspect the status of the statistics after each of the following commands. Now run the following query
select * from dbo.SalesOrderDetail
where SalesOrderID = 43670 and OrderQty = 1
Use the previous sys.stats query to verify that two statistics objects were created, one for the SalesOrderID column and another one for the OrderQty column (they both have names starting with _WA_Sys as shown in the next figure). Now create the following index and again run the query to verify that a new statistics object for the ProductID column has been created. Notice the value of the auto_created column which tells if the statistics were created by the query optimizer.
create index ix_ProductID on dbo.SalesOrderDetail(ProductID)
Run the next command to update the column statistics only. You can validate that only the column statistics were updated by looking at the update_date column which uses the STATS_DATE function to display the last date the statistics were updated.
update statistics dbo.SalesOrderDetail with fullscan, columns
This command will do the same for the index statistics
update statistics dbo.SalesOrderDetail with fullscan, index
These commands will update both index and column statistics
update statistics dbo.SalesOrderDetail with fullscan
update statistics dbo.SalesOrderDetail with fullscan, all
See how an index rebuild only updates index statistics
alter index ix_ProductID on dbo.SalesOrderDetail rebuild
Here you can verify that reorganizing an index does not update statistics
alter index ix_ProductID on dbo.SalesOrderDetail reorganize
Finally, remove the table you have just created
drop table dbo.SalesOrderDetail
I will be speaking at the Orange County SQL Server Professionals User Group this Thursday, October 1st, 2009. The topic is "How the Query Optimizer Works". So if you are in the Orange County or Los Angeles area please stop by and say hello.
The meeting starts at 6:30 PM. More details and directions can be found here
Orange County SQL Server Professionals User Group
Since I will be speaking about the Query Optimizer at the coming PASS Summit, I have been preparing my presentation and at the same time blogging about it. This time I will describe the Missing Indexes feature, seen from the point of view of the Query Optimizer.
We know that it is the job of the Query Optimizer to find an efficient execution plan for a query. But we rarely see the Query Optimizer directly giving us indications about what it needs to produce a better execution plan. One of these cases is the Missing Indexes feature, which was introduced with SQL Server 2005.
The Query Optimizer defines what the best indexes for a query are, and if these indexes do not exist, it will make this information available in the XML plan and the sys.dm_db_missing_index DMVs. And of course, by showing this information the Query Optimizer is also warning you that it might not be selecting an efficient plan. This information shows which indexes may be helpful to improve the performance of your query. You can even use SQL Server 2008 Management Studio to display the CREATE INDEX commands needed to create these indexes, as shown later.
However, although this information about missing indexes is very helpful, this feature should not be used as a tuning tool and should not replace your own index analysis. Database administrators and developers should be aware of its limitations, as described on the Books Online entry 'Limitations of the Missing Indexes Feature'.
So let us take a quick look to see how this feature works. Create a dbo.SalesOrderDetail table on the AdventureWorks database with the following command
into dbo.SalesOrderDetail
from sales.SalesOrderDetail
Run this query and ask for a graphical or XML execution plan
from dbo.SalesOrderDetail
where SalesOrderID = 43670
This query can benefit from an index on the SalesOrderID column but no missing indexes information is shown this time. One limitation of the Missing Indexes feature is that it does not work on a trivial plan optimization, like in this case. You can verify that this is a trivial plan by looking at the graphical plan properties (Optimization Level shows as TRIVIAL) or by looking at the XML plan (StatementOptmLevel="TRIVIAL).
You can avoid the trivial plan optimization by using more complex features. In our case we are just going to create a non related index
create index ix_ProductID on dbo.SalesOrderDetail(ProductID)
Note that the index created will not be used by our previous query but the query will no longer qualify for a trivial plan. Run the query again. This time the XML plan will contain something like this
<MissingIndexGroup Impact="99.703">
<MissingIndex Database="[AdventureWorks]" Schema="[dbo]" Table="[SalesOrderDetail]">
<ColumnGroup Usage="EQUALITY">
<Column Name="[SalesOrderID]" ColumnId="1" />
And if you look at the graphical plan (only SQL Server 2008 Management Studio) you will see a Missing Index warning and a CREATE INDEX command
You can right-click on the graphical plan and select Missing Index Details to see the CREATE INDEX command that can be used to create this index
Missing Index Details from SQLQuery1.sql
The Query Processor estimates that implementing the following index could improve the query cost by 99.703%.
USE [AdventureWorks]
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[SalesOrderDetail] ([SalesOrderID])
Create the recommended index after you provide a name to it. This time if you run the same query again and look at the execution plan you will see that an Index Seek operator is using the index you have just created and both the Missing Index warning and the MissingIndex element of the XML plan are gone.
Finally, remove the dbo.SalesOrderDetail table you have just created.
drop table dbo.SalesOrderDetail
I will be speaking at Los Angeles SQL Server Professionals Group this Thursday, September 17, 2009. The topic is "How the Query Optimizer Works". So if you are in the area please stop by and say hello.
Los Angeles SQL Server Professionals Group
I got a question from a reader of my post How the Query Optimizer Uses Statistics (http://sqlblog.com/blogs/ben_nevarez/archive/2009/09/03/how-the-query-optimizer-uses-statistics.aspx) and I thought that it would be a good idea to post my answer here. Basically the request was to expand the previous example for a predicate with two columns.
First, a reminder that the histogram only shows the values of the first column of the statistics object. So, how the Query Optimizer does this?
One way to find the answer to this is, well, just to run an example and see what the Query Optimizer does. Let us run a query, see which statistics are automatically created and inspect those statistics.
This is the code sent by the reader. Run this to create a table and populate it with some data.
create table MyStatsTest (
id int identity(1, 1),
ProductGroupID int,
ProductID int
declare @i int
set nocount on
set @i = 1
while @i < 100000
insert MyStatsTest (ProductGroupID, ProductID)
select datepart(millisecond, getdate()) % 2, datepart(millisecond, getdate())
set @i = @i + 1
Make sure you start with no statistics objects in the table. You can run this to verify that there are no statistics
where object_id = object_id('MyStatsTest')
If there are some statistics, perhaps after running a query, you can drop them using a command like this (the name of your statistics objects may be different)
drop statistics MyStatsTest._WA_Sys_00000002_7D78A4E7
Run the first query to see the statistics created automatically by the Query Optimizer.
select * from MyStatsTest
where ProductId < 17 and ProductGroupId = 1
Now you can run the previous query again and notice that two statistics objects were created. Use DBCC SHOW_STATISTICS to display both histograms like in the next example
dbcc show_statistics('MyStatsTest', _WA_Sys_00000003_014935CB)
You can use the first histogram to estimate the number of records for the ProductId < 17 predicate using the method I described in my previous post. I got 1,744 rows which is the sum of the values 392, 302, 313, 419 and 318 (Your table has different data so you will get a different value).
Using the second histogram you can notice that 60.0316003% of the records have ProductGroupid = 1 (This is 60,031 divided by the total number of records 99,999).
Since this is using the AND operator you need to obtain the 60.0316003% of 1,744. This is 1,046.95 which is the estimated number of rows shown on the execution plan of the query.
You can do the same calculation for ProductGroupId = 0 and you will get an estimated number of rows of 697.049 which are also shown on the execution plan. Notice that you may need to run DBCC FREEPROCCACHE between tests to clear the plan cache, otherwise it may show a cached execution plan.
Finally, let us change the query to use OR operator (instead of AND)
where ProductId < 17 or ProductGroupId = 1
The plan shows 60,728 estimated rows. Since this is using an OR operator this value could be obtained as the union of the following two queries
where ProductId < 17
where ProductId >= 17 and ProductGroupId = 1
The first query estimates 1,744 rows and the second one 58,984, for a total of 60,720 rows. You can use the previous method to estimate these values.
The same value could also be obtained as the union of these two queries
select * from MyStatsTest
where ProductId < 17 and ProductGroupId = 0
where ProductGroupId = 1
The first one shows 697.049 estimated rows and the second one 60,031, for a total of 60,728.049 estimated rows.
In case you are not aware, the excellent white paper "Statistics Used by the Query Optimizer in SQL Server" has been updated for SQL Server 2008.
You can find it here
Statistics Used by the Query Optimizer in SQL Server 2008
Writer: Eric N. Hanson and Yavor Angelov
Contributor: Lubor Kollar
This post shows how the Query Optimizer uses statistics to estimate the selectivity of expressions during query optimization.
You can also use this as a second part of my last post, The Query Optimizer and Parameter Sniffing. Here I will show you the advantage of the use of statistics when the Query Optimizer can "sniff" the parameter values compared to just guessing the selectivity of expressions when local variables are used. So I will be using the same query as in that previous post.
Notice that there are many other details that can not be covered here so this post will focus on a very simple example to show how the Query Optimizer creates and uses statistics.
To start open your AdventureWorks database and run this to display the current statistics on the ProductID column of the Sales.SalesOrderDetail table
dbcc show_statistics('Sales.SalesOrderDetail', IX_SalesOrderDetail_ProductID)
This will display the header, density vector and histogram of the statistics object.
1) Understanding the Histogram
First I will explain the meaning of the values of a histogram's steps. Let us take a look at step 86, shown here
RANGE_HI_KEY is the upper boundary of a histogram step. The value 826 is the upper boundary for step 85 and 831 is the upper boundary for step 86. This means that step 86 may contain only values from 827 to 831.
Run the following query to obtain the real number of records for ProductIDs 827 to 831 to compare them against the histogram
select ProductID, COUNT(*) as Total
from Sales.SalesOrderDetail
where ProductID between 827 and 831
group by ProductID
This produces the following result
Going back to the histogram, EQ_ROWS is the estimated number of rows whose column value equals RANGE_HI_KEY. In our example RANGE_HI_KEY is 831 and the number of records with ProductID 831 is 198. The same value is shown on the histogram.
RANGE_ROWS is the estimated number of rows whose column value falls inside the range of the step, excluding the upper boundary. In our example, this is the number of records with values from 827 to 830 (831, the upper boundary, is excluded). The histogram shows 110 records and we could obtain the same value by getting the sum of 31 records for 827, 46 records for 828, 0 records for 829 and 33 records for 830.
DISTINCT_RANGE_ROWS is the estimated number of rows with a distinct column value inside this range, excluding the upper bound. In our example we have records for three distinct values: 827, 828, and 830, so DISTINCT_RANGE_ROWS is 3. There are no records for ProductID 829 and 831 is again excluded.
Finally, AVG_RANGE_ROWS is the average number of rows per distinct value and it is calculated as RANGE_ROWS / DISTINCT_RANGE_ROWS. In our example, we have a total of 110 records for 3 DISTINCT_RANGE_ROWS, so that gives, 110 / 3 = 36.6667 also shown on the histogram for step 86.
Now let us see how the statistics are used to estimate the selectivity of the queries.
2) When the Query Optimizer knows the value
Let us see the first query
select * from Sales.SalesOrderDetail
where ProductID = 831
Since 831 is a RANGE_HI_KEY on step 86, the Query Optimizer will use the EQ_ROWS value and the estimated number of rows will be 198.
Now run the same query with the value 828
This time the value is inside the range of step 86 but it is not a RANGE_HI_KEY so the Query Optimizer uses the value calculated before as AVG_RANGE_ROWS. Actually, we get the same estimated number of rows for any of the other values in the range (except RANGE_HI_KEY). This also includes 829, even when there are no records for this ProductID.
Let us try now a nonequality operator and try to find the number of records less than 714. For these we need to calculate the sum of the values of both RANGE_ROWS and EQ_ROWS for steps 1 thru 7, which give us a total of 13,223 rows.
This is the query and the estimated number of rows is shown on the execution plan
where ProductID < 714
3) When the Query Optimizer does not know the value
In the case when the Query Optimizer does not know the value used in the expression, like when local variables are used, the Query Optimizer can not use the histogram so it will use some other information including the statistics density information or it will try to guess the selectivity using some fixed percentages. First, let us try using the equality operator.
declare @pid int = 897
where ProductID = @pid
The Query Optimizer is not able to see the value 897 in this query. As explained in my previous post, the Query Optimizer does not know the value of the @pid local variable at optimization time. So it will use the density value of the ProductID column, 0.003759399, as listed on the second section, density vector, of the DBCC SHOW_STATISTICS output. If we multiply this value by the total number of records, 121,317, we will get 456.079 which will be shown in the next execution plan.
Finally, run this query with a nonequality operator
where ProductID < @pid
Same as before, the value 897 does not matter; any other value will give you the same estimated number of rows and execution plan. The estimated number of rows is always 30% of the total number of records for a nonequality operator. In this case the 30% of 121,317 is 36,395.1 as shown next.


text:
I'm looking to play in at least one tourney sometime in the next month, but none are really close to me. I'm about 2 hours from houston, 3 from dallas and 5 from austin/san antonio.
Any thought on what I should play out of HOTT in Kyle, TX, PIAS Open in Crowley, and Live Oak?
I'd like a two day event, 4 rounds, but none of these really offer that. I'm also hoping to play a tourney on a championship course (par 60+), but i don't know if that's a possiblity this summer in my area.

subset: commoncrawl


text:
Leave the sheep counting to the shepherd the next time you can't fall asleep – help may be as close to you as your fridge.
Ashley Sleep, one of the nation's top mattress brands, recently published a list of 10 natural sleep aids to help consumers catch their ZZZs.
"What we put into our bodies prior to going to bed can really affect the level of sleep we get every night," Ben Thorud, Senior Vice President of Ashley Sleep said in a news release. "If you've tried everything and you're still experiencing sleeplessness, it may be time to explore other possibilities, including your diet."
Although turkey's high levels of sleep-inducing tryptophan came in at the top list, milk and dairy products were a close second.
Warm milk has always been a bedtime tradition, and now research has shown why it helps. In addition to tryptophan, milk, yogurt and cheese are all rich calcium, which may help reduce stress. Combined, tryptophan and calcium may enhance one's ability to fall asleep by producing melatonin, a key role in regulating day-to-night cycles in the human body.
This isn't the first time that milk has been considered as a sleep aid. In 2010 a German company released a milk powder that claimed to help insomniacs sleep better. More recently, a New Zealand-based milk powder manufacturer developed a similar product dubbed "Night Milk." For both companies, cows milked just a few hours past midnight expressed more melatonin than those milked later in the morning, which in turn offers a natural sleep aid for those battling to get shut-eye. Read more.
In addition to turkey and dairy, Ashley Sleep also suggested consuming bananas, cherries, chamomile tea, hummus, almonds, warm oatmeal, peanut butter and hard-boiled eggs. Their interest in sleeping goes far beyond just the mattresses they manufacture; they also list several facts on the benefits of sleep, including what sleep deprivation can do to the immune system.


text:
It's interesting that Catie Curtis is performing tonight at Uncle Calvin's and Melissa Ferrick performs tomorrow. It's not uncommon to see them on the same bill together. They even teamed up as One Long Earring, a sort of lesbian folk supergroup. Both are on their own this weekend on opposite sides of town.
Ferrick released Still Right Here in September and it's been riding the Billboard Heatseekers Album Chart rather nicely, debuting at the 35 position. Now she and her peeps are trying to land it in the top 20. That might happen after you check out her show Saturday at Poor David's Pub.
Lesley Godlberg did a fantastic interview with Ferrick in March 2010 for AfterEllen.com. I don't think I ever realized Ferrick's song "Drive" was considered a lesbian classic. So hopefully she'll include it as part of her set list Saturday.
The venue is also hosting a costume party with prizes awarded. Not sure if that will distract much from the show, but what the hell — it's Halloween.
DEETS: With Elizabeth Wills and Vandaveer. Poor David's Pub, 1313 S. Lamar St. 7:30 p.m. $16. PoorDavidsPub.com.


text:
Medela Symphony® & Lactina® Rental Kit (Black Nylon)
Item #: 67206
Everything a mother needs to collect, store and transport breast milk with the Symphony or Lactina breast pump. Lightweight carrier has designer styling that goes anywhere, and adjustable shoulder strap for comfort and easy-care fabric that cleans up with just a damp cloth. Includes insulated bottle storage compartment with separate compartment for the pump and accessories. Just add the Symphony or Lactina rental breast pump.


text:
Kelly Services Temporarily Undervalued
Buying shares at extreme low points is very satisfying. Entering a trade before an upturn is established, though, sometimes mean being too early. The temporary-help agency Kelly Services (KELYA) is Michigan-based but worldwide in operations. It offers a nice package of a still bargain-priced stock that already has a bit of upward momentum.
Profitability suffered in the 2008-09 recession but has been bouncing back nicely. Earnings per share recovered to $0.71 in 2010 and $1.24 in 2011 and are expected to be about $1.37 for 2012 when fourth-quarter results are announced later this month....274 more words left in this article. To read them, just click below and try Real Money FREE for 14 days.
There's no substitute for a trading floor to get great ideas, so Jim Cramer created a better one at Real Money and blogs there exclusively. We then added legendary hedge fund manager, Doug Kass, with his exclusive Daily Diary and best investing ideas. Staffed with more than 4 dozen investing pros, money managers, journalists and analysts, Real Money Pro gives you a flood of opinions, analysis and actionable trading advice found nowhere else, and allows you to interact directly with each expert.
Already a Subscriber? Please login.


text:
We ship to over 100 countries, including:
Please select the language that you would like to browse the site in.
Please select the currency you would like to shop in. Your order will be transacted in USD.
Size: Select a Size
Oops! We encountered an issue trying to perform this action. Please try again.
Thanks! We've received your email address and will send you a note when this item is back in stock.
Please login or create account before adding to wishlist
Style: 43104942 Color Code:
American made printed bodycon dress with a super stretchy fabrication and an ultra slim next-to-skin fit.
Eleventh Hour Bodycon styled by the FP Me community
Hey you!
Be the first to write a review.


text:
Becky Brotzman, DVM,will present a series of webinars through the end of the year. These webinars will looks at calf environment methods that work, including:
- Cleaning the air in calf barns on Oct. 30 at Noon CST. Registration ends on Oct. 23.
- Calf hutches of barns: Methods to make either option work well on Nov. 20 at Noon CST. Registration ends on Nov. 13.
- Animal well-being concerns for every calf caretaker on Dec. 11 at noon. Registration ends on Dec. 4.
Fully recorded versions of each webinar will also be available to those who register for the event but are unable to attend the live webinar.
Professional Dairy Producers of Wisconsin members can register for $100 per session but can save $25 if registered for all three webinars. Non-members can register for $125 per session.


text:
Close to Welcombe Mouth beach, Meadowgate is filled with Allsop's home-crafts and interiors. From Vanessa Arbuthnott fabrics to her own range of gold and black wallpaper, Allsop has put her stamp on the place.
Previously reserved for longer-term lettings, her summer home is now available for five- or six-night breaks at rates rising to £3,402. Proving that a real pro knows how to turn a profit from her property.
Visit www.classic.co.uk/holiday-cottage/desc-2356.html for booking details.
Gallery: the latest celebrity homes gossip
Gallery: the latest celebrity homes gossip
1/49 Do a DiCaprio and buy yourself a private island
The rich and famous crave privacy and security so it is little wonder they snap up private islands. Leonardo DiCaprio (pictured), Johnny Depp and Shakira are just some of the celebs who have bought their own remote hideaway (scroll right...). Image: REX
2/49 Last island standing
Isola di Mal Ventre (pictured) is believed to be the only remaining private Mediterranean island that's available to buy. The £1.2 million island is located a few miles off the north-eastern coast of Sardinia, close to Porto Cervo, the fashionable glitterati hangout where Gwyneth Paltrow, Rihanna and Beyoncé like to spend their holidays.
3/49 Peter Andre is selling his home
Pop star-turned-presenter, Peter Andre, is selling his six-bedroom house on the exclusive Dormans Park private estate
in West Sussex (scroll right...). Image: REX
4/49 Peter's family base in East Grinstead
The £2 million family home was the main location for his ITV2 reality series, My Life, and comes with a big family room, terrace and summerhouse.
> Search for houses and flats for sale in East Grinstead
5/49 Alesha's old home for a snip
The former home of Britain's Got Talent judge, Alesha Dixon, has been reduced from £1.15 million to £1 million in Welwyn Garden City (scroll right...). Image: REX
6/49 Inside Alesha's former family home
The three-bedroom property has plenty of bling touches including a luxury bathroom with a sunken tub, a 25ft dressing room, gym, steam room and hot tub.
> Search for houses and flats for sale in Welwyn Garden City
7/49 What the Dickens?
A one-bedroom flat in a blue-plaque building that was once home to Charles Dickens is for sale (scroll right...). Image: Getty.
8/49 Charles Dicken's Fitzrovia home
The 510sq ft property in Fitzrovia is on the market for £665,000 and is a stone's throw from wine bars and restaurants.
> Search for houses and flats for sale in Fitzrovia
9/49 Heidi Klum is selling her LA home
Supermodel Heidi Klum is selling the lavish LAmansion she bought with her former husband Seal for £14.6 million. She is making the £5.6 million Bel Air villa she purchased last year her main residence (scroll right). Image Rex.
10/49 Klum's piece of heaven
Klum's home for sale has eight bedrooms, 10 bathrooms, a formal rose garden, infinity-edge pool, a children's playhouse, Pacific views and access to hiking trails. The mother of four described the property as her "little piece of heaven." Image FameFlynet UK.
11/49 Keegan and Wright's dream home
TV's hottest couple Michelle Keegan and Mark Wright have settled on their dream home in Essex. Leaving Manchester behind, the former Coronation Street star talked of her plans to install a giant walk-in wardrobe in the love nest, ahead of her wedding to the ex-TOWIE cast member. Image Getty.
12/49 Kirstie Allsop's cottage is up for short-term rentals
Handmade Britain presenter Kirstie Allsop is inviting staycationers into her "cosy" 14-person Devon cottage, Meadowgate, close to Welcombe Mouth beach (scroll right). Image Channel 4.
13/49 Allsop's handmade beach cottage
Kitted out with her own rage of gold and black wallpaper, Allsop's summer home is now available for five- or six-night breaks at rates rising to £3,402 - proving that a real pro knows how to turn a profit from her property.
14/49 Home to the stars for sale
A four-storey 1820s family home at One Royal Circus in Edinburgh, whose doors have welcomed some of Britain's brightest stars of entertainment, is up for sale. The eight-bedroom, seven bathroom former boutique B&B is on the market for £1.995 million (scroll right).
15/49 Cat Deeley among B&B's famous guests
Cat Deeley, Ewan McGregor, Rob Brydon, Jimmy Carr, JK Rowling and David Walliams are just some of the famous faces that have stayed at the guesthouse, whose owners Mike and Susan Gordon splashed out £600,000 on restoration work during the 14 years of operation. Image Getty.
16/49 Buy Kate's cottage hideaway
The Welsh cottage where Kate Moss fled the paparazzi with former boyfriend Pete Doherty is on the market. The couple stayed at the Powys residence in 2005, when The Libertines frontman was making his music with his band at the on-site Twin Peaks studio (scroll right). Image Getty.
17/49 Holiday homes with Moss appeal
It is now up for sale as a package with a 19th-century house and another building of 4,500 square feet which comes with planning permission to be turned into a holiday haven for walkers. The three properties are being offered for a total of £1.25 million.
18/49 RiRi builds Hollywood bridges
Rihanna is spending the summer in a new rented home above Sunset Strip in West Hollywood. The super-bling California house has seven bedrooms, nine bathrooms and a separate guesthouse that's linked to the main home by a glass bridge (scroll right). Image: Splash.
19/49 For £35,0000 a week...
The party girl can host her bashes in the bar area, have cosy nights in watching movies in the screening room or cook up a storm in the Porsche Design kitchen. The singer star is splashing out £35,000 a month on the property.
20/49 £3m love nest with decor by Chanel
Rosehall, an estate and Georgian mansion in the Scottish Highlands, has a fascinating history. Bought in the Twenties by Hugh Grosvenor, 2nd Duke of Westminster, the Britain's richest man, it became the focus of his six-year romance with Coco Chanel (scroll right). Image Getty.
21/49 Chanel-designed interiors
The French couturier decorated the 20 rooms, reputedly installing Scotland's first bidet, and the property is thought to be the only one outside continental Europe with Chanel-designed interiors.
22/49 Laurie Johnson puts his home on the market
Celebrated composer Laurie Johnson, the man who brought us The Avengers theme tune, is selling his seven-bedroom, wisteria-clad Tudor mansion in Stanmore, Harrow. He has lived in the Grade II-listed Priory House for 52 years (scroll right) Image Getty.
23/49 For sale to tune of £5m
The property features authentic brick barrel chimneys, William Morris panels in the dining room and Tudor fireplaces. A priest-hole underground passage runs from the house, used by Catholics fleeing persecution.
24/49 Nicole Scherzinger searches for dream home
Now things are back on track with Formula 1 champion boyfriend Lewis Hamilton, singer Nicole Scherzinger is looking around Knightsbridge for her dream home. She should make a beeline for Herbert Crescent, where a glamorous home, tucked behind Harrods, is new to the market (scroll right) Image Getty.
25/49 SW1 house with £11.25 million price tag may suit
The property was recently refurbished. The living room and master bedroom have full-height windows, the open-plan kitchen/dining area leads to a terrace and there's a basement pool. If Scherzinger, whose new single Your Love is out on July 13, wants to splash £11.25m, she should call Savills.
26/49 Chris Brown sells properties in Hollywood
Rihanna's ex recently sold a penthouse in West Hollywood for £1m, the same price he paid for it in 2011. It marks a fresh start for Brown, 25, who recently served more than two months in prison relating to his probation for assaulting Rihanna in 2009 (scroll right). Image Getty.
27/49 Pop bad boy is offloading his property portfolio
The Don't Wake Me Up singer also just sold his house in Hollywood for £1.12 million, but probably won't be missed by neighbours, who filed official complaints after he spray-painted the exterior with monster images.
28/49 Johnny Depp aims to star behind the bar
The actor and his fiancée, Amber Heard, are keen to buy a weekend base, says Heard's father, David. Depp is often seen in Marylebone, so The Harcourt Arms, listed for £3m with Fleurets, may appeal — and he could convert the top floors of the Grade II-listed pub into a pied-à-terre. Image Rex.
29/49 Stargaze over Adele's studios for £3.5m
Adele has been seen in Ladbroke Grove leaving the XL Recordings studio where she is said to be working on a new album. Mountgrange Heritage has a four-bedroom flat for sale in nearby Arundel Gardens at £3.5 million — great for star spotting. Image Rex.
30/49 Ryan Reynolds and Blake Lively could take Manhattan — in Covent Garden
While in London shooting his latest movie, Woman in Gold, Ryan Reynolds could do worse than opt to stay in a Manhattan-style loft apartment... (scroll right) Image Rex.
The luxurious penthouse measures a roomy 1,400sq ft and offers both a private roof terrace and gym facilities. The apartment is just a short walk from West End theatres and The Ivy restaurant, a celebrity favourite.The couple would have to pay £3,250 a week for the flat, let through Hamptons International — chicken feed for such Hollywood A-listers.
32/49 A royal love nest
The Primrose Hill home where Wallis Simpson was courted by Edward VIII is now on the market for £15m, a price cut of £3m. The property was used by the king to romance both the American divorcee and her friend Lady Furness, who preceded Mrs Simpson in his affections. Image: AP.
33/49 Dr Dre buys Gisele Bündchen home
Brazilian supermodel and actress Gisele Bündchen has sold her California mansion to rapper Dr Dre (scroll right)... Image: Rex.
Dre's blingy new five-bedroom pad comes with a gym, sauna, covered terraces and an infinity pool. No doubt the super-producer, who has worked on albums for 50 Cent, Eminem and Snoop Dogg, will install his own recording studio... (scroll right)
The music mogul paid £23.8m for the 18,298sq ft property — £5.9m below the original asking price. But the saving is a drop in the ocean for Dre, who recently sold his Beats Electronics and Beats Music company to Apple for £1.79 billion. Image: Rex.
36/49 Let it be - sold
A three-bedroom apartment is up for sale above the basement flat where John Lennon and Yoko Ono posed nude for their 1968 Two Virgins album cover. The £2.75m Marylebone property is in Montagu Square, a hangout for music legends of the Sixties including Jimi Hendrix, Ringo Starr and Scott Walker.
37/49 Megan Fox is selling house for her cubs
Megan Fox is selling her LA home. The actress, who gave birth to son Bodhi Ransom Green three months ago, is keen to buy a bigger place to accommodate her growing family. Fox and her husband, actor Brian Austin Green, also have a one-year-old son, Noah (scroll right).
Image: Getty.
38/49 Fox's home I
...The couple bought the 5,385sq ft house five years ago for £1.75 m. It comes with four bedrooms, and extra hi-tech installations include projection screens, a cutting-edge sound system and security video camera surveillance..
39/49 Fox's home II
It also comes with a private pool and is on the market for £2.3 million.
40/49 Buy Sven's old home - for a coach's salary
Sven-Göran Eriksson's former six-bedroom mansion in Värmland, Sweden, is for sale. It includes a private marina on Lake Fryken, where the former England football coach, who now manages Guangzhou in China, loved to walk in the rain and think (scroll right). Image: Rex
...Listed at £3.6 million, Björkefors Manor comes with 2.5 acres of landscaped gardens. Swedish author Selma Lagerlöf, who in 1909 was the first female recipient of the Nobel Prize in Literature, also once called the 1820s mansion home. The grounds include a pool house, guest villa and tennis court.
42/49 Owen Pacey's City Rd flat lights Jamie Oliver's fire
Pacey is the go-to man for glamorous reclamation furniture. His clients include Naomi Campbell, Robbie Williams and Cher. Chef Jamie Oliver loves Pacey's Shoreditch home so much that he is using the roof terrace as a filming location for his YouTube channel. Pukka indeed.
43/49 To a-mews the wartime princesses...
Filming is taking place for Girls' Night Out, the new movie from the producers behind Diana. The re-imagining of VE Day in 1945 follows then-Princess Elizabeth and Princess Margaret when they were allowed out of Buckingham Palace for one night to celebrate the end of the war. (scroll right)
44/49 ...a perfect bolt hole near the palace?
The film sees celebrations take a turn for the worse when the younger princess disappears. Tucked away in a cul-de-sac of mews-style properties running parallel to Buckingham Palace Road, 24 Stafford Place might have made the perfect discreet bolthole — and could also be an ideal film location.
45/49 Chiltern Firehouse home
The Chiltern Firehouse is London's hottest celebrity venue with the Beckhams, Cara Delevigne, Rita Ora and Harry Styles among visitors. Paris based studio KO, who are behind the trendy interiors, have also designed a penthouse in Fitzrovia Apartments. The three-bedroom apartment has two roof terraces and views over Regent's Park.
46/49 Gyllenhaal's holding out for 'the one'
Jake Gyllenhaal, 33, recently viewed a £2.24 million townhouse, which has not been on the market for 40 years, in NYC's upmarket Tribeca. The actor, who can be seen in new thriller Enemy, has been looking for a new place for over five months but is determined to hold out for the right home.
47/49 Home is where the art is
Elm Row in Hampstead was once the private residence of Sir Henry Cole, the founder of the Victoria & Albert Museum. For the past 26 years it has been home to Lord Mitchell, Labour's enterprise adviser, and his film-maker wife Hannah Mitchell. Now for sale, the mansion has a south facing 48-foot wall garden, five bedrooms and a beautiful drawing room.
48/49 Gorst's Garden House
James Gorst's architecture practice has worked on some of London's best known buildings, including the Royal Exchange. Gorst has now designed a private house in Hampstead. Planning approval has been granted for The New Garden House, which will have five bedrooms and a wine cellar... (scroll right)
49/49 Tempting Borat back?
...Gorst's The New Garden House will replace a house close to where Borat star Sacha Baron Cohen once lived. If the actor and his actress wife Isla Fisher fancy moving back to the area and into the new house - and have £8 million to spare - this could make a great investment.
Follow us on Twitter @HomesProperty, Facebook and Instagram
- More about:
- Kirstie Allsop
- Meadowgate
- Vanessa Arbuthnott
- Welcombe Mouth


text:
The Soundtrack For The 99 Percent
"We are the 99 percent."
This slogan has served as the rallying cry for one of the more significant recent social movements, Occupy Wall Street.
And like all social movements, it began with a single spark. Occupy Wall Street's fuse was lit by Adbusters. The Vancouver-based anticonsumer magazine proposed an "occupation" of Wall Street on Sept. 17 to fight against the power held by multinational conglomerates, major banks and the richest 1 percent who are, according to the Occupy Wall Street official website, "writing the rules of an unfair global economy."
In six weeks, the cause has spread like to more than 1,000 cities in the United States — including major cities such as Chicago, Houston, Las Vegas, Los Angeles, and Miami, down to smaller towns such as Kalispell, Mont. Occupy Wall Street has also spanned continents, with demonstrations taking place from London to Tokyo and Sydney.
Downtown at the main Occupy Wall Street camp in New York on Oct. 11, a protestor held up an altered American flag, but instead of stars there were logos of corporate behemoths. Speakers representing the "99 percent" talked about losing their homes, jobs and retirement funds, and being saddled with student debt and unable to afford health care. In between speeches, protesters danced and chanted to the beat of rhythmic drumming. There was music everywhere.
The antiwar and civil rights movements of the 20th century inspired music that both molded and reflected the rapidly evolving climate of the time. Songs such as "We Shall Overcome" instantly bring to mind peaceful marchers set upon by fire hoses and snarling dogs. In 1969 the country watched as hundreds of thousands of people sang John Lennon's "Give Peace A Chance" in front of the White House in protest of the Vietnam War. Politically minded singer/songwriters of that era created music that resonates strongly with many of the "occupiers" now protesting economic inequality. But will Occupy Wall Street, like the protest movements of yesteryear, have its own distinct soundtrack?
It appears likely as artists such as Arlo Guthrie, Talib Kweli, Tom Morello, Pete Seeger, and Kanye West, among others, have made appearances in support of Occupy Wall Street demonstrations.
Kweli was greeted by an appreciative Occupy Wall Street crowd in New York on Oct. 6. He connected with protestors because his spoken-word performance spoke to the cause's message, reflecting his revolution-friendly track record as a poet and "conscious" hip-hop artist. Less mainstream but well-respected artists such as Kweli are taking advantage of the world stage Manhattan's Zuccotti Park and other Occupy Wall Street sites offer. Unique to this movement, their live performances have spread virally through blogs, Twitter and YouTube.
"This is not a movement that needs famous people," says Morello, who is the guitarist for Rage Against The Machine and a singer/songwriter under the moniker the Nightwatchman. "It's a cooperation, everybody pitches in. I use my musical skills to help out anyway that I can."
Legendary folk singers Guthrie and Seeger joined approximately 1,000 protestors in a march on New York's Upper West Side on Oct. 21, leading a version of "We Shall Overcome."
Morello has visited five occupied cities, including Los Angeles, Seattle and Vancouver, during stops on his recent tour. Like other artists, he is performing to "keep the wind in the sails and steel in the backbone" of the protestors.
On Oct. 13 Morello performed at the Occupy Wall Street camp in New York. "My first song is for all the people who lost everything," he told the crowd before playing four songs, including Woody Guthrie's 1947 classic "This Land Is Your Land," on acoustic guitar, encircled by enthusiastic protestors.
Guthrie, a folk icon and activist in his own right, is represented by a slew of artists on the new album, Note Of Hope — A Celebration Of Woody Guthrie. Artists contributing interpretations of Guthrie's work include Jackson Browne, former Recording Academy Vice Chairman Kurt Elling, Ani DiFranco, Morello, Lou Reed, and Seeger. Reed sings Guthrie's "The Debt I Owe," a song with woeful lyrics that could be the theme song for many of today's protestors: "Several times a day, a thought comes over me/I owe more debt than I ever can pay back/More money than I'll ever see."
Morello chose "Ease My Revolutionary Mind" for his contribution, calling it "a story of love and longing in the midst of a class war throw-down." Morello draws inspiration from Guthrie for the songs that make up his Nightwatchman project, citing Guthrie's music as "a battering ram for social justice."
Politics aside, "Ease My Revolutionary Mind" has a sense of humor, and it's that same joyful spirit that Morello sees in Occupy Wall Street.
"It's not just people sitting around grousing and reading boring speeches," says Morello. "There's dancing, laughter and music. It's about trying to create a little bit of the world you want to see."
(Caroline Cooney is a New York-based freelance journalist and scriptwriter.)


text:
Note: This item is more than 13 years old. Please take the publication date into consideration for any date references.
Print – Plain Text – Permalink
News Release
Media Contact: TPWD News, email@example.com, 512-389-8030
June 14, 2004
Stay Tuned
Information from Texas Parks and Wildlife is available on radio and television, as well as the newsstand.
Passport to Texas, TPWD's radio series of weekday, 90-second stories is broadcast on about 100 Texas stations. Airing the week of June 7-11, We'll tell you how a Central Texas county is making sure its local river is accessible to everyone. Plus, do you know how many rivers and streams there are in Texas? Before you get out a map and start counting, we'll tell you.
For more information, visit the Web (http://www.passporttotexas.org/).
Video News
TPWD provides video news reports that run in newscasts on numerous Texas stations, as well as on cable and satellite outlets around the nation.
"Texas Parks & Wildlife" is a weekly half-hour television series seen on PBS affiliates around the state. The episode that airs the week of June 13-20, Problems both natural and man-made threaten the Rio Grande; Balmorhea State Park; noisy woodpeckers; homemade bat cave; reel repair; the movie star train; and San Marcos River paddlers.
For more information about this week's programs and where they can be viewed, visit the Web (http://tpwd.texas.gov/tv).
Texas Parks & Wildlife magazine is always available on newsstands throughout the state and by subscription for $19.95 a year. To subscribe, call (800) 937-9393 or order online (http://www.tpwmagazine.com/).
Publication — Permission is granted to publish, in whole or in part, any news releases on this page.
Print — A print-friendly version of the news release shows only the release with font sizes set to the browser default.
Plain Text — Plain text versions of TPWD news releases are provided for copying and pasting into editing software.
To copy text into an editing software:
- Click a Plain Text link to display the plain text page in your browser.
- Select all.
- Copy.
- Paste in a document in your editing program.
Permalink — This is a direct link to the news release, omitting the navigation context from the URI.
English/Spanish — News releases posted in both English and Spanish have one of these links.
If you have any suggestions for improving these pages, send an e-mail to email@example.com and mention Plain Text Pages.
(5.4.16 i)


text:
When you commemorate the unforgettable moments of your life with a Sarraf ring, you honor your life story with the finest craftsmanship available. This 18k White Gold classic wedding band is 2mm wide and 1.4 mm thick, and thisSarraf band is engineered for comfort, "Comfort Fit" design allows for a better fit since the inside of the ring is curved so that it doesn't cut into your finger during wear.
Posted by Krys Turner on 4th Jan 2014
Excellent service as usual.
Posted by Wilcoxson on 20th Aug 2013
First class service and product
Posted by terry kleinsasser on 24th Jun 2013
I am extremely satisfied with my purchase and the whole experience of receiving my rings. The whole experience was exceptional
Accepting Returns
If for any reason you aren't satisfied, you can return any non-engraved item in its original condition for a refund or exchange. If you have any questions about our return procedure, please don't hesitate to contact us.
Returning Your Order
To return a jewelry item to Sarraf Jewelry Inc., follow our three step process:
Sarraf Inc.
Attn: Returns
650 S. Hill St., # 728
Los Angeles, CA 90014
And Exchange
Sarraf Inc.
Attn: Exchange
650 S. Hill St., # 728
Los Angeles, CA 90014
Once your return is received, it will be reviewed by our Quality Assurance department. You will receive credit back to the same credit card which was charged to or exchange within seven business days.
Any improperly packaged, or non-insured packages will be returned to sender. Items that show signs of wear or have been resized (by a jeweler other than Sarraf Jewelry Inc.), engraved, altered, special ordered items or damaged in any way cannot be accepted for return.
* Sarraf Jewelry Inc. will not be
responsible for loss or damage of return shipments.


text:
Israel Aerospace Industries (IAI) is showing off its latest precision-guided munition here at Le Bourget. Known as MLGB (medium-weight, laser-guided bomb), the weapon has dual-mode guidance and is intended for use by light attack aircraft, as well as by multi-role fighters.
Weighing 253 pounds, MLGB has a number of advanced features corresponding to key requirements in the modern battlefield. It is five feet six inches long and carried on standard 14-inch lugs. Fixed cruciform wings of 17-feet-four-inches span give a good standoff glide capability when released from altitude, and the relatively light warhead provides low collateral damage effects.
MLGB employs a combination of GPS and semi-active laser guidance, the latter providing better than one-meter CEP accuracy and a capability against moving targets. If laser guidance is not available, then the system guides the weapon to GPS coordinates with slightly reduced accuracy. Fuzing options allow the choice of air-burst, impact or delayed (penetration) detonation.
Some of IAI's other capabilities are also on show here in Paris, including sensor turrets from the Tamam division. The latest products are the MOSP3000 14/15-inch and MiniPOP eight-inch stabilized turrets, both of which can accommodate up to five sensors and are integrated with INS/GPS systems to enable geo-referencing and geo-pointing capabilities.
Additional IAI capabilities in the spotlight are the company's work on nano-satellites, which are typically less than 22 pounds in weight, and the ELM-2288 AD Star mobile air defense and threat alert radar.
AD Star is a product of IAI's Elta subsidiary, which among its wide electronics portfolio produces ISR (intelligence, surveillance, reconnaissance) systems. Elta's ELI-3120 manned compact ISR system has recently been installed in a King Air 350 aircraft and delivered to a Latin American customer for missions targeting drug traffickers, illegal logging and mining, deforestation, border crossing and pollution.


text:
Rays now have three candidates for fifth-starter spot
PORT CHARLOTTE, Fla. -- The competition for the fifth spot in the Rays' rotation got whittled down to three on Thursday, when Nathan Karns was optioned to Minor League camp.
Karns highlighted Thursday's moves that saw the right-hander joined by righty Kirby Yates, left-handers Jeff Beliveau and C.J. Riefenhauser, outfielder Kevin Kiermaier, shortstop Hak-Ju Lee and infielder Vince Belnome, who were all optioned to Minor League camp. Outfielder Mikie Mahtook was re-assigned to Minor League camp.
The Rays' spring roster now stands at 44, including right-hander Juan Carlos Oviedo, has yet to report due to visa issues.
Karns was acquired in a trade that sent catcher Jose Lobaton and outfielder Drew Vettleson to the Natonals.
Karns had a solid outing Wednesday in Dunedin, Fla., against the Blue Jays, when he allowed no runs on three hits, while walking one and striking out one in 3 1/3 innings. But that wasn't enough to keep him in the race, which now includes just three: Jake Odorizzi, Erik Bedard and Cesar Ramos. All three will pitch in split-squad games on Saturday.
"[Karns] threw really well yesterday," Rays manager Joe Maddon said. "I repeat, I think he's got great makeup. He's a Major League pitcher. There's a couple of things we want him to work on."
Maddon pointed out that in recent team history, the Rays have sent pitchers such as Chris Archer and Alex Cobb back to Minor League camp, and ultimately those moves have worked.
"Get this guy down, get him in a regular rotation, get him stretched out properly, give him a menu to work on a couple of different things," Maddon said. "We feel very confident he's going to help us this year and possibly help us a lot.
"We like everything about him. We just thought this is the right time to get him back, using our recent history by how successful we've been by doing it that way."
Maddon complimented all of the pitchers optioned, noting how competitive the camp has been and how remarkable the overall talent level is. That prompted another compliment, this one to the front office for assembling the group.
Maddon also took a moment to tout the merits of Lee, who missed most of 2013 after tearing ligaments in his left knee.
"The thing that I really like about Hak-Ju right now, he's gotten bigger and stronger and he's really changed his hitting mechanics," Maddon said. "I can see why he was so successful in a brief period offensively last year. Much stronger base when he hits. A much stronger swing. A more forceful swing. ... The biggest difference I see with him is that."
Maddon added that Lee still seems to be a little restricted with his movements, which the manager attributed partially to the fact that Lee has to wear a brace on his left knee for an undetermined period.
Bill Chastain is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.


text:
CHRISTIE Miller men won their sixth and final central region group match of the season but missed out on claiming a wildcard into the Wessex League end-of-season play-offs, writes DAVE EATON.
The Melksham club thumped Purnell (Paulton) by 42 shots in their last match, but other results went against them.
Miller dominated against Somerset side, taking the honours on three of the four rinks and only just failing to record a whitewash losing the other game by the narrowest of margins - a single shot.
At Christie Miller, the quartet led by Andy Moore registered a comprehensive 19-shot success while alongside Brian Routledge's four won by seven shots.
Away in Paulton, the four skipped by Paul Macdonald were always in control winning by 17 shots, but alongside Nigel Price's rink was edged out on the last end by a single shot after dropping eight shots in the last five ends.
Christie took 14 points out of a possible 16 but with Dorchester and Bournemouth both collecting 16 points, West Berks (Newbury) 14 and Solihull 12, Christie failed to gain one of the four wild cards on offer to the best non-qualifiers on points average per game.
Home - Rink 1: Paul Barnes, Steve Gedge, Dave Laws & Andy Moore beat R Gay 34-15. Rink 2: Tom Newman, Dale Hayward, Bob Pratt & Brian Routledge beat J Matthews 24-17. Away - Rink 1: Chris Easton, Jim Roy, Graham Archard & Nigel Price lost to J Bradley 20-21. Rink 2: John Bailey, Adrian Bolwell, Mike Savin & Paul Macdonald beat M Pratt 27-10.
Score: Christie Miller beat Purnell 105-63 and by 14pts to 2pts.
BOTH the Clarrie Dunbar men and women were victorious in their Somerset County Double Rink quarter-final ties.
The men recorded a narrow 43-39 victory over Ilminster while the ladies thrashed Watchet 59-27 last week.
Dunbar men had a tough fight on their hands and appeared to be going out of the competition in the quarter final as they trailed Ilminster 38-34 with only three ends remaining.
Winners of the double rinks for the past two years Clarrie produced a superb finish with the away rink picking-up a seven and the home rink holding on for victory.
In the semi-finals Clarrie will play Victoria (Street) on March 15.
Home: Dick Discombe, John Freeman, Duncan McGovern & Russell Francis beat Peter Mattravers 22-20.
Away: Andrew Taylor, Brian Hawkins, Dale Taylor & Terry Perkins beat John Ridout 21-19.
Score: Clarrie Dunbar beat Ilminster 43-39.
THE LADIES were in complete control of their delayed county double rinks quarter-final against Watchet.
They dominated the tie from the outset to run-out victors by 32 shots in a comprehensive 59-27 success.
Both rinks were victorious with Jeanette Wheeler's home four winning by 19 shots and Nesta Parfitt's away quartet recording a 13 shots success.
Clarrie ladies will now meet Donyatt in the county double rinks semi-final on March 23.
Home: Nicki Keefe, Jo Dunford, Teresa King & Jeanette Wheeler beat N Webber 30-11.
Away: Shirley Samuels, Sadie Farrell, Ailsa Midwinter & Nesta Parfitt beat N McDonald 29-16.
Score: Clarrie Dunbar beat Watchet 59-27.
THE duo of Kim Smith and Andrew Colebrooke reached the quarter-finals of the national mixed pairs in Lincoln last weekend, but then went out to the eventual winners.
Clarrie's Smith and Colebrooke led Sean Coyle and England women's international Wendy King 6-5 at five ends and had raced 15-5 clear at ten in their last 16 match but were then reeled back in.
They only led 18-14 at 15 and were tied 19-19 at 18 but two singles on the last three ends gave them a narrow 21-20 win.
In the quarter-finals they faced two well established England internationals and former national mixed pairs winners Ellen Falkner and Nicky Brett (City of Ely).
Smith and Colebrooke were 4-2 down at five ends but tied 7-7 at ten but had slipped behind again trailing 12-8 at 15.
They were 17-12 down at 18 ends and eventually lost 22-12.
The Clarrie Dunbar pairing should not be too despondent with the loss as the following day Falkner and Brett beat Hartlepool 25-14 in the semis and Wellingborough (Northampton) 24-11 in the final to lift the mixed pairs trophy again.


text:
CHATTANOOGA, Tenn. — McKee Foods, makers of Little Debbie snack cakes, is offering $25 to $30 million for Hostess Brands' Drake's brand, according to published reports. Hostess filed for Chapter 11 bankruptcy protection in January 2012.
The Tennessee maker of Little Debbie snack cakes is poised to be the lead bidder at an auction for the assets of the bankrupt company, composed mostly of intellectual property and some equipment, according to the reports. Drake's Wayne, N.J., plant — the only kosher bakery plant in the U.S., a Hostess investment banker has said in court — isn't included in the deal.
Drake brands is the maker of such treats as Devil Dogs, Ring Dings and Yodels.
Hostess is aiming to file the agreement with the U.S. Bankruptcy Court in White Plains, N.Y., on Monday. The deal requires a judge's approval to be put into action, and the offer will be subject to higher bids at auction.


text:
Physicians for Human Rights-Israel: Exploiting Human Rights for Political Goals
By NGO Monitor
April 15, 2004
Physicians for Human Rights Color Pamphlet Contradicts its Own Mission Statement
By NGO Monitor
January 17, 2003
Physicians for Human Rights - Israel: Continuing to Exploit Human Rights for Political Ends
By NGO Monitor
October 15, 2004
Betrayed by Silence: NGOs Ignore Gilad Shalit´s Rights
By NGO Monitor
March 26, 2009
EU and NIF-funded NGOs Lead Condemnations in Gaza Conflict
By NGO Monitor
December 31, 2008
NGO News in Brief
By NGO Monitor
September 3, 2008
The 'Halo Effect' Shields NGOs from Media Scrutiny
By Naftali Balanson
August 10, 2008
NGO News in Brief
By NGO Monitor
August 7, 2008
Media Falls for NGO's "Halo Effect"
By HonestReporting.com
August 5, 2008
NGO News in Brief
By NGO Monitor
July 3, 2008
NGO News in Brief
By NGO Monitor
June 5, 2008
A Disturbing Diagnosis
By Daniel Fink
April 30, 2008
NGOs Promote "Israeli Apartheid Week"
By NGO Monitor
February 13, 2008
PHR-I "Double Standard": Richard Horton's 2007 Visit to Gaza and Israel: A Fool's Journey
By Professor Elihu D. Richter MD MPH
January 16, 2008
NGO News in Brief
By NGO Monitor
September 2, 2007
NGO News in Brief
By NGO Monitor
July 2, 2007
NGO Activity in Brief
By NGO Monitor
December 21, 2006
NGOs in the Lebanon War - Update 3
By NGO Monitor
August 9, 2006
Gaza Crisis and NGO Responses
By NGO Monitor
July 17, 2006
NGOs' Political Biases Reflected in Reports on Gaza Violence
By NGO Monitor
July 6, 2006
Political Activities of Israeli and Palestinian NGOs - II
By NGO Monitor
May 16, 2006
B'Tselem and Physicians for Human Rights-Israel (PHR-I) Accuse Israel of Violating Geneva Convention
By NGO Monitor
April 2006
Physicians for Human Rights-Israel (PHR-I) Provides Unverifiable Report to International Media
By NGO Monitor
March 23, 2006
Medecins Du Monde and Physicians for Human Rights - Israel: Report Denouncing Security Barrier Not Credible
By NGO Monitor
February 14, 2005
European Commission Funds Physicians for Human Rights Palestinian Prisoners Conference
By NGO Monitor
December 15, 2004
"Political Humanitarianism" and Medical NGOs
By NGO Monitor
December 5, 2003
Israel Medical Association Accuses PHR-Israel of Politicization
By NGO Monitor
March 11, 2003
9 Dror St.
Jaffa-Tel Aviv 68135
Opposing "the subjugation of medical care to political considerations of any kind," Physicians for Human Rights-Israel (PHR-I) was established in 1988 by Israeli and Palestinian doctors as "a non-partisan, non-profit organization dedicated to promoting and protecting the right to health care [for Palestinians] in Israel and in territories under Israel's effective control." "It was apparent," explains PHR-I, "that human rights violations in the form of systematic and official denial of access to medical care, the intentional infliction of bodily injury, torture and neglect of prisoners, grossly substandard medical care and facilities in the occupied territories and East Jerusalem, administrative detention and solitary confinement were issues that demanded attention. Therefore, PHR-Israel was founded to address these very issues."
PHR-I has adopted a consistently biased stance against Israel, prompting the Israel Medical Association to sever all ties with the organization. For instance, PHR-I regularly condemns "the Israeli Occupation," drawing no moral distinction between Palestinian terrorist attacks targeting civilians, and Israeli military reprisals targeting those terrorists. Moreover, the organization contends that "the State of Israel has no authority to erect checkpoints or roadblocks as a form of total control of the movement of Palestinian residents within the West Bank and Gaza Strip."
PHR-I also opposes Israel's security fence, constructed in the West Bank for the purpose of preventing Palestinian terrorists from reaching Israeli population centers. On January 29, 2004, PHR-I took part in a demonstration "tour" (organized by the NGO Ta'ayush) in the area of Abu Dis, East Jerusalem. According to PHR-I's press release of February 1, 2004, (titled "PHR-Israel tour of the Jerusalem Stranglehold"), "The wall is just the latest step in Israel's policy of separating the East Jerusalem hospitals from the communities they serve."
PHR-I was a co-endorser of a May 19, 2004 advertisement that appeared in the newspapers Ha'aretz and Al-Quds, depicting the Israeli Defense Force's (IDF) demolition of Palestinian homes in Rafah (located in Gaza) as unconscionable violations of human rights -- making no mention of the fact that the homes in question were being used as terrorist bases. Co-sponsors of this ad included such Palestinian NGOs as Adalah, Al-Haq, Al-Mezan Center for Human Rights, HaMoked, I'lam, and the Palestinian Center for Human Rights.
Denunciations of Israeli policy constitute the dominant theme of PHR-I literature. An August 16, 2004 report on the Rafah Crossing (in the Gaza Strip) criticizes restrictions (which it terms "collective punishment") on Palestinians attempting to enter Israel through this point. However, PHR-I makes no attempt to define this concept, or to distinguish it from legitimate and necessary security measures. Similarly, a May 2004 report titled "The Bureaucracy of Occupation," produced jointly with Machsom Watch, impugns the District Coordination Offices responsible for issuing travel permits to the Palestinian population. Without mentioning Palestinian terrorism, the report states that "[t]he denial of freedom of movement is a human rights violation."
PHR-I literature also asserts that Israeli soldiers deliberately shoot at Palestinian civilians despite the existence of clear rules governing the use of live fire and a well-defined legal system to deal with any abuses of those regulations. For example, an August 31, 2004 press statement claims: "According to information given ... by Palestinian medical organizations in Gaza ... the soldiers suddenly, and with no prior warning, opened fire" on a Palestinian ambulance.
In an October 3, 2004 statement, PHR-I condemned IDF operations in the northern Gaza Strip, virtually ignoring the fact that the operation was intended to prevent the firing of Qassam missiles into Israel.
PHR-I receives funding from Christian Aid, the European Union, the Ford Foundation, and the New Israel Fund.
This profile is adapted, with permission, from the NGO Monitor.
Since Feb 14, 2005 --Hits: 61,630,061 --Visitors: 7,024,052
Copyright 2003-2015 : DiscoverTheNetworks.org


text:
Nail BagRiddles are little poems or phrases that pose a question that needs answering. Riddles frequently rhyme, but this is not a requirement.
And forced to carry ten nails.
I work diligently without any pay
And follow your many trails.
I do not smell very well
But at least I have many eyes.
I have two tongues but never yell
And I'll bet you know my size.
What am I?
AnswerYour shoes!
What Next?
See another brain teaser just like this one...
Or, just get a random brain teaser
If you become a registered user you can vote on this riddle, keep track of
which ones you have seen, and even make your own.
Back to Top