Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, let's take this one part at a time.</p> <blockquote> <p>So when a partition is in place in a table, then I still would use a normal query.</p> </blockquote> <p>Yes. Partitioning is transparent to you, it is meant to optimize (when well used) query performance by dividing physical. storage of data and indexes into separate "bins".</p> <blockquote> <p>Where does the "pruning" come in, at the database side of the query? Is it pretty much a complex stored Where clause that is applied to every query then?</p> </blockquote> <p>Yes and no. Depending on partitioning schema, MySQL puts your data into disjoint "bins". Later it reads the <code>WHERE</code> clause of your query and knows which partitions it must check to answer it. MySQL documentation has a few nice examples in documentation: <a href="http://dev.mysql.com/doc/refman/5.5/en/partitioning-pruning.html" rel="nofollow">Partition Pruning</a>.</p> <p>It allows you to store each partition on different physical storage device and MySQL can run some operations in parallel or don't scan some partitions at all (see examples from link above).</p> <blockquote> <p>Why are the partitions named if they are not individually accessed?</p> </blockquote> <p>They are individually accessed, but you don't make this decision - optimizer does it. Partition names make it easier for you to manage them. You can find possible operations in documentation (<a href="http://dev.mysql.com/doc/refman/5.5/en/partitioning-management.html" rel="nofollow">Partition Management</a>).</p> <p>Since MySQL 5.6.2 you can select data from individual partitions, see <a href="http://dev.mysql.com/doc/refman/5.6/en/partitioning-selection.html" rel="nofollow">Partition Selection</a>. Just an advice - don't use this syntax if you don't have to, because using it makes your queries bound to storage structure of your data (and don't use an unstable version of MySQL in production ;).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload