solved activity stream speed issue

solved activity stream speed issue
Please use `JDatabase` query format.
For Example: 
```php
// Initialiase variables.
$db    = JFactory::getDbo();
$query = $db->getQuery(true);

// Create the base select statement.
$query->select('*')
	->from($db->quoteName('#__table'))
	->where($db->quoteName('state') . ' = ' . $db->quote('1'))
	->order($db->quoteName('ordering') . ' ASC');

// Set the query and load the result.
$db->setQuery($query);

try
{
	$result = $db->loadObjectList();
}
catch (RuntimeException $e)
{
	throw new RuntimeException($e->getMessage(), $e->getCode());
}
```