Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Optimize the database queries #7710

Merged
merged 10 commits into from
Mar 27, 2015
Merged

Optimize the database queries #7710

merged 10 commits into from
Mar 27, 2015

Conversation

leofeyer
Copy link
Member

This PR relates to #7450.

@aschempp
Copy link
Member

Would it be useful to move $time = time() - (time() % 60); to something like \Date::minute()?

@leofeyer
Copy link
Member Author

As discussed on Mumble on March, 26th, we should add a method Date::floorToMinute():

public static function floorToMinute($intTime=null)
{
    if ($intTime === null)
    {
        $intTime = time();
    }

    return $intTime - ($intTime % 60);
}

'parent' => 'index'
'source' => 'index', // FIXME: remove?
'parent' => 'index', // FIXME: remove?
'source,parent,published' => 'index'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on Mumble on March, 26th, the indexes on the source and parent columns can be removed and a stand-alone index on the published column should be added.

@leofeyer leofeyer merged commit 453e4ce into develop Mar 27, 2015
@leofeyer
Copy link
Member Author

Merged in 573b4b6.

@leofeyer leofeyer deleted the feature/db-optimization branch March 27, 2015 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants