<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Joins on properly indexed tables (such as nodes + fields) don't have
    any serious performance impact. It' the very basis of a relational
    database, so they are made to handle them optimally. <br>
    <br>
    One thing to consider with your multiple table approach. What if you
    want a page listing all content on the site, ordered by create date?
    You are going to have to get into a very serious query and it will
    force the database to use filesort and temporary tables. There's no
    getting around that when sorting by a column distributed amongst
    multiple tables. This performance impact will be thousands times
    worse than having all your content types in the single node table.<br>
    <br>
    Another issue is keeping unique nids (though not that complex to
    work out). In Drupal, the nid is an auto increment field. You would
    want to manage the new nids on your own so that two different
    content types don't have the same NID. If they do, you would
    severely break other modules, like comments. <br>
    <br>
    From an overall management stand point, I would keep all the nodes
    in the same table and look at better caching solutions. If your
    going to be getting mostly anonymous visitors, then something like
    Boost (or Varnish if this is a VPS or dedicated server) will give
    you far more performance gains than anything else.<br>
    <br>
    <pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
    <br>
    On 2/11/2011 12:00 PM, Deva wrote:
    <blockquote
      cite="mid:AANLkTimUE5fxZ8Nv6z_PH9tZyvSrktF5VFUKgZrOS4Jh@mail.gmail.com"
      type="cite"><font face="verdana,sans-serif">In my case i am going
        to have lots of content types with lots of cck fields.<br>
        D7 creates new table for each cck field. So while reading a node
        from database. It is going to do a join. I dont think that is
        good thing. <br>
        <br>
        That is why i was checking if it is possible to have different
        table for each content type. <br>
        <br>
      </font><br>
      <div class="gmail_quote">On Fri, Feb 11, 2011 at 9:48 PM, nan wich
        <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div>
            <div style="font-family: arial,helvetica,sans-serif;
              font-size: 12pt;">
              <div>Blake, I totally agree. When I created my first node
                module, even the docs you mention didn't exist. I had to
                look at other modules to get an idea of how to do it. I
                even had to do the same with adding fields to Views.</div>
              <div>&nbsp;</div>
              <div>"...unless what they offer is documented, in a manner
                that others can recreate... it may as well not exist" is
                absolutely true. However, one must also realize that one
                form of documentation may not "fit all." For example, I
                really appreciate all the Views docs that exist now,
                but&nbsp;most are written way over my head - and I am no
                beginner with Drupal. I fully accept that my failure to
                grasp those docs are my fault, but I have heard many
                others express the same feeling, while, at the same
                time, I see others just glance at it and turn out
                perfect code right away. Different people learn in
                different ways. I guess that's why there are many books.<br>
                &nbsp;</div>
              <div class="im">
                <p><font size="4" color="#ff007f" face="bookman old
                    style, new york, times, serif"><i><b>Nancy</b></i></font></p>
                <p>&nbsp;</p>
                <p><font face="arial, helvetica, sans-serif">Injustice
                    anywhere is a threat to justice everywhere. -- Dr.
                    Martin L. King, Jr.</font></p>
                <div><br>
                </div>
              </div>
              <div style="font-family: arial,helvetica,sans-serif;
                font-size: 12pt;"><br>
                <div style="font-family: times new roman,new
                  york,times,serif; font-size: 12pt;"><font size="2"
                    face="Tahoma">
                    <hr size="1">
                    <b><span style="font-weight: bold;">From:</span></b>
                    Blake Senftner &lt;<a moz-do-not-send="true"
                      href="mailto:bsenftner@earthlink.net"
                      target="_blank">bsenftner@earthlink.net</a>&gt;<br>
                    <b><span style="font-weight: bold;">To:</span></b> <a
                      moz-do-not-send="true"
                      href="mailto:development@drupal.org"
                      target="_blank">development@drupal.org</a><br>
                    <b><span style="font-weight: bold;">Sent:</span></b>
                    Fri, February 11, 2011 10:45:33 AM<br>
                    <b><span style="font-weight: bold;">Subject:</span></b>
                    Re: [development] Is it possible to have separate
                    table for different content types in D7<br>
                  </font>
                  <div>
                    <div class="h5"><br>
                      Granted, I've not yet dived into the D7 specifics
                      of creating custom content types, but I'd like to
                      address a point Nancy makes here:
                      <div><span style="font-family:
                          arial,helvetica,sans-serif; font-size: 16px;"><br>
                        </span></div>
                      <div><span style="font-family:
                          arial,helvetica,sans-serif; font-size: 16px;">Lastly,
                          why? I would think that the overhead of
                          managing multiple tables would outweigh any
                          potential gains. I can't even begin to think
                          what you would have to do to Views to make it
                          work in your scenario.</span></div>
                      <div><font size="4" face="arial, helvetica,
                          sans-serif"><span style="font-size: 16px;"><br>
                          </span></font></div>
                      <div>I consider it an issue of quality
                        documentation. When I was first learning module
                        development, CCK was nice, but I could not
                        figure out how to programmatically create or
                        manage CCK fields. &nbsp;Being unable to
                        programmatically create content types with CCK
                        meant that my modules either could not implement
                        content types, or I'd have to make them without
                        CCK. There was no quality documentation
                        explaining CCK at the time, so via books like
                        "Front End Drupal" and "Pro Drupal Module
                        Development" I learned how to create my own
                        tables and manage them myself, including the
                        not-difficult-because-it's-documented
                        integration of custom fields with Views. (see: <a
                          moz-do-not-send="true"
                          href="http://views-help.doc.logrus.com/help/views/api-tables"
                          target="_blank">http://views-help.doc.logrus.com/help/views/api-tables</a>).</div>
                      <div><br>
                      </div>
                      <div>I absolutely do not mean to pick on Nancy. I
                        love Drupal. I'm betting my company on the
                        Drupal technology stack. But developers have got
                        to realize that unless what they offer is
                        documented, in a manner that others can recreate
                        and expand on your module's facilities, <i>it
                          may as well not exist</i>. Poor or missing
                        documentation leads to poor, incorrect, or
                        missing integration with other modules. (Sorry
                        if this sounds like a rant. Trying to figure out
                        things in Drupal is a sore spot for me.)</div>
                      <div>
                        <div>
                          <div><span style="text-transform: none;
                              text-indent: 0px; border-collapse:
                              separate; font: medium Helvetica;
                              white-space: normal; letter-spacing:
                              normal; color: rgb(0, 0, 0); word-spacing:
                              0px;"><span style="text-transform: none;
                                text-indent: 0px; border-collapse:
                                separate; font: medium Helvetica;
                                white-space: normal; letter-spacing:
                                normal; color: rgb(0, 0, 0);
                                word-spacing: 0px;">
                                <div style="word-wrap: break-word;"><span
                                    style="text-transform: none;
                                    text-indent: 0px; border-collapse:
                                    separate; font: 12px Helvetica;
                                    white-space: normal; letter-spacing:
                                    normal; color: rgb(0, 0, 0);
                                    word-spacing: 0px;"><span
                                      style="text-transform: none;
                                      text-indent: 0px; border-collapse:
                                      separate; font: 12px Helvetica;
                                      white-space: normal;
                                      letter-spacing: normal; color:
                                      rgb(0, 0, 0); word-spacing: 0px;">
                                      <div><br>
                                        Sincerely,</div>
                                      <div>-Blake</div>
                                      <div><a moz-do-not-send="true"
                                          href="mailto:bsenftner@earthlink.net"
                                          rel="nofollow" target="_blank">bsenftner@earthlink.net</a></div>
                                      <div><a moz-do-not-send="true"
                                          href="http://www.blakesenftner.com/"
                                          rel="nofollow" target="_blank">www.BlakeSenftner.com</a></div>
                                      <div><br>
                                      </div>
                                    </span></span></div>
                              </span></span></div>
                          <br>
                          <div>
                            <div>On Feb 11, 2011, at 7:16 AM, nan wich
                              wrote:</div>
                            <br>
                            <blockquote type="cite"><span
                                style="text-transform: none;
                                text-indent: 0px; border-collapse:
                                separate; font: medium Arial;
                                white-space: normal; letter-spacing:
                                normal; word-spacing: 0px;">
                                <div>
                                  <div style="margin: 0px; font-family:
                                    arial,helvetica,sans-serif;
                                    font-size: 12pt;">
                                    <div style="margin: 0px;">There are
                                      several extra questions to be
                                      asked here:</div>
                                    <ol>
                                      <li>Define "separate." If one
                                        creates a node module that
                                        creates content types, then one
                                        must manage the extra fields -
                                        generally&nbsp;in new (i.e. separated
                                        from node &amp; node_revisions)
                                        tables created by the module.</li>
                                      <li>If one is talking about
                                        content created by other (e.g.
                                        core) modules, then the answer
                                        is maybe. Take a look at the sql
                                        rewriting hooks or whatever D7
                                        has done to them.</li>
                                      <li>Lastly, why? I would think
                                        that the overhead of managing
                                        multiple tables would outweigh
                                        any potential gains. I can't
                                        even begin to think what you
                                        would have to do to Views to
                                        make it work in your scenario.<br>
                                        &nbsp;</li>
                                    </ol>
                                    <p><font size="4" color="#ff007f"
                                        face="bookman old style, new
                                        york, times, serif"><i><b>Nancy</b></i></font></p>
                                    <div>&nbsp;<br>
                                    </div>
                                    <p><font face="arial, helvetica,
                                        sans-serif">Injustice anywhere
                                        is a threat to justice
                                        everywhere. -- Dr. Martin L.
                                        King, Jr.</font></p>
                                    <div style="margin: 0px;"><br>
                                    </div>
                                    <div style="margin: 0px;
                                      font-family:
                                      arial,helvetica,sans-serif;
                                      font-size: 12pt;"><br>
                                      <div style="margin: 0px;
                                        font-family: times,serif;
                                        font-size: 12pt;"><font size="2"
                                          face="Tahoma">
                                          <hr size="1">
                                          <b><span style="font-weight:
                                              bold;">From:</span></b><span>&nbsp;</span>Deva
                                          &lt;<a moz-do-not-send="true"
href="mailto:devendra.in@gmail.com" rel="nofollow" target="_blank">devendra.in@gmail.com</a>&gt;<br>
                                          <b><span style="font-weight:
                                              bold;">To:</span></b><span>&nbsp;</span><a
                                            moz-do-not-send="true"
                                            href="mailto:development@drupal.org"
                                            rel="nofollow"
                                            target="_blank">development@drupal.org</a><br>
                                          <b><span style="font-weight:
                                              bold;">Sent:</span></b><span>&nbsp;</span>Fri,
                                          February 11, 2011 7:59:26 AM<br>
                                          <b><span style="font-weight:
                                              bold;">Subject:</span></b><span>&nbsp;</span>[development]
                                          Is it possible to have
                                          separate table for different
                                          content types in D7<br>
                                        </font><br>
                                        <font face="verdana,sans-serif">Hi
                                          All,<br>
                                          <br>
                                          Is possible to have separate
                                          table for each content type?<br>
                                          <br>
                                          Thanks in advance<br
                                            clear="all">
                                        </font><br>
                                        --<span>&nbsp;</span><br>
                                        :DJ<br>
                                        <br>
                                        <br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </span></blockquote>
                          </div>
                          <br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      :DJ<br>
      <br>
      <br>
      <div style="visibility: hidden; left: -5000px; position: absolute;
        z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px;
        overflow: hidden; word-wrap: break-word; color: black;
        font-size: 10px; text-align: left; line-height: 130%;"
        id="avg_ls_inline_popup">
      </div>
    </blockquote>
  </body>
</html>