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

  • SEARCH
  • Home
  • 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 6063941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:13:30+00:00 2026-05-23T09:13:30+00:00

Sorry if this is a stupid question but new to this so need some

  • 0

Sorry if this is a stupid question but new to this so need some help to understand a couple of things. Im currently upgrading mysql to 5.1 so I can use partitions in mysql. My question is if I partition a table, would a partitioned table, including the pruning process, still work on a quering using a join or is partitioning optimal if your just quering the table that has the partitions?

EDIT

Here is an example query:

SELECT event.*,site.* FROM event INNER JOIN site ON event.siteid = site.id
WHERE event.eventdate >= [somedate] AND event.eventdate <= [somedate]
AND event.siteid = [siteid]

And I have partitions setup on the events table using the eventdate field. Would mysql still be able to use the partitions on the events table including the pruning process?

  • 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-05-23T09:13:31+00:00Added an answer on May 23, 2026 at 9:13 am

    Partioned tables can be used in joins.

    Tweak the where clause to include one partition only to get the best performance.
    e.g. if you partition by year, you can do a join like:

    select * from a
    inner join partioned_table p on (p.id = a.id)
    where p.year = '2011';
    

    This query will work with and without the where clause, but with the where clause it will be much faster because you are only accessing one partition.
    If you access more partitions, MySQL has to use a temporary table to stitch the partitions together before it can do the join.
    This kind of defeats the purpose of partitions.

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

Sidebar

Related Questions

Sorry if this is a stupid question, but I am new to this. I
I'm sorry if this is a stupid question, but I'm very new to Matlab,
Sorry if this is a stupid question but I am new to WP7 development
Sorry if this is stupid question, but I'm new to MATLAB. I have a
I'm sorry if this a stupid question, but I am new to this. I
I'm fairly new to C so sorry if this is a stupid question but
Sorry if this seems like a stupid question but im actually having a hard
OK sorry this is a bit of a stupid question. Currently I am developing
Sorry if this is a easy question but I am totally new to WP7.
sorry if this question is stupid, but I can't wrap my head around Java

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.