Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8226259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:42:11+00:00 2026-06-07T15:42:11+00:00

I was doing a simple query using explain to know precisely the execution time.

  • 0

I was doing a simple query using explain to know precisely the execution time.

    $this->db->toto->find($req)->sort(array('date' => 1))->explain();

I now want to use explain on a map and reduce query, how to do that ?
Should I use the ‘classic’ profiling system?

I’m trying to compare the execution time of theses 2 queries.

ex:

    $res = $this->db->command(array(
        "mapreduce" => "toto",
        "map" => $map,
        "reduce" => $reduce,
        "finalize" => $finalize,
        "query" => $req,
        "out" => array("inline"=>1)
    ))->explain();

Doesn’t work because command return an array (explain need a MongoCursor).

Thanks you a lot 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:42:14+00:00Added an answer on June 7, 2026 at 3:42 pm

    Explain won’t work on a command like map/reduce. The beat you can do is run explain on the query you’re using.

    If you just need execution time, you can run the m/r and time it. That’s how explain determines the execution time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Grails 1.3.7 and MSSQL Server 2008. Doing simple query through both dynamic
I am doing a really simple query in ASP.NET, but after I inserted the
I'm just doing a simple graph using Open Flash Chart http://teethgrinder.co.uk/open-flash-chart/ which shows the
I am doing very simple int division and I am getting odd results. This
I'm doing a simple query on the database, a search on two columns. I
I'm using .NET 4 and the Entity Framework to construct a simple query. Here's
I have a problem with a relatively simple query and the execution plan Access
(Using MySQL 4.1.22) I can't get this query of mine to use an index
I'm doing a simple MySQL query to count the number of rows a query
I want to do a simple Key-Only query using a key (so to test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.