alright guys...

Brett Dikeman brett at cloud9.net
Wed May 1 22:41:58 EDT 2002


...let's retire the whole insurance thread :-)

On a listmaster-business note, I have a good chunk of the messages
from the 200q20v list since we moved to Audifans, in the new archive
database system(which is pretty incomplete), but for fun I did a
query to see who the top posters were.  It's probably THE most
hideously "expensive" query to run on the DB:

select u.email, count(*)
	FROM messages m, users u WHERE from_id=u_id
	GROUP BY u.email
	HAVING count(*) > 50
	ORDER BY count DESC;

It's got a massive join, an aggregate function, a limit, AND a sort.
Yeesh.  Takes something like a good 3-6 seconds on the PII-300 test
box...doesn't sound too bad, until you realize that the DB only has
8000 messages in it/500 users, and will, when fully loaded, have
closer to a half million messages/10,000 users.

Anyway, it spits out, after much deep thought:
.

              email              | count
--------------------------------+-------
  C1J1Miller at aol.com             |   540
  pjrose at frontiernet.net         |   469
  b.m.benz at prodigy.net           |   433
  knotnook at traverse.com          |   337
  t44tq at mindspring.com           |   248
  malth at umich.edu                |   236
  brett at cloud9.net               |   183
  fundsaloracing at yahoo.com       |   171
  gpowell at ennovatenetworks.com   |   144
  dbpulvino at hotmail.com          |   110
  peschulz at cisco.com             |   105
  wolff at turboquattro.com         |   104
  MikeMilr at blackfoot.net         |   100
  Chewy4000 at aol.com              |    88
  brett at brettd.dsl.speakeasy.net |    87
  pwaterloo at compuserve.com       |    81
  QSHIPQ at aol.com                 |    80
  WARATAP at aol.com                |    79
  ingo at waratap.com               |    75
  sidman at montereynet.net         |    71
  montesawong at yahoo.com          |    70
  Mike.Sylvester at sycamorenet.com |    63
  prl at ptc.com                    |    63
  Thomas.Forhan at mail.house.gov   |    60
  Brian.Link at Level3.com          |    59
  MartinGG at aetna.com             |    58
  mikemilr at blackfoot.net         |    54
  calvinlc at earthlink.net         |    53
  charlie at istari.com             |    52
  DPulvino at agraus.com            |    51
  hah at srv.net                    |    51
(31 rows)

Brett
--
----
"They that give up essential liberty to obtain temporary
safety deserve neither liberty nor safety." - Ben Franklin
http://www.users.cloud9.net/~brett/



More information about the 200q20v mailing list