In ecore, in the user table, lasttime is 0 if the user hasn't logged in (so that's one easy way to tell). However, as an ecore administrator, I'd like to admonish against dropping users (or nodetypes). Ecore 0.8 does not do well with deleting nodes of those types. Now, theoretically, users that have never logged in shouldn't have any record fragments to them, but certainly deleting users that have logged in is a bad idea.

Ecore assumes when it gets a node (and oftentimes in the code), that the author_user attribute exists. Therefore, if you start deleting users, you're going to see a huge outcropping of Server Errors! until all the places where this assumption is false is special cased in. This includes messages, logs, etc.

All things considered, the potential performance gain of deleting users is low, seeing as database key lookup is, I believe, O(log n). You're not going to pick up much by whacking those users, compared to the gigantic amounts of breakage you might incur.

IMO, there are better places where you can pick up perf than carving out never-logged-in users. We've had this same discussion several times at Everything2.com

    --jb

In reply to Re: Database Clean up? by JayBonci
in thread Database Clean up? by defyance

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.