<br><div class="gmail_quote">On Tue, Mar 31, 2009 at 11:47 AM, David Cohen <span dir="ltr"><<a href="mailto:drupal@dave-cohen.com">drupal@dave-cohen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is there a performance drawback to<br>
this? </blockquote><div><br></div><div>Probably not a perceptible one - table scans will walk the length of a varchar, so you'll be walking some 256-length entries when there are Facebook sessions active... not really a big deal imo.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is it bad form to alter the table this way?</blockquote><div><br></div><div>That might be the sticking point. I can see some problems arising quickly from letting modules alter core tables:</div>
<div>-FB Connect sets sid to varchar(256)</div><div>-Foo.module, installed later, sets sid to varchar(128)</div><div>Now FB Connect doesn't work.</div><div><br></div><div>Quick alternate ideas that come to mind:</div>
<div>-Setting a PHP session instead</div><div>-Making a mapping table of FB sid -> drupal sid</div><div>-Doing what you're considering, but instead storing the FB sids as md5 hashes in the sessions table to keep the varchar(64) constraint</div>
<div>-Some combination of these</div><div><br></div><div><br></div><div>-D</div></div>