Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your...

28
Aaron Thul Electronic Medical Office Logistics (EMOL) http://chasingnuts.com/oscon1.08.pdf

Transcript of Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your...

Page 1: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

AaronThulElectronicMedicalOfficeLogistics(EMOL)http://chasingnuts.com/oscon1.08.pdf

Page 2: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

WhoamI?

  Computer&DatabaseGeek,justlikeyou  FormerlyaSysAdminatAutowebCommunications  PostgreSQLBuildYourCar

  PresentlyaITmanagerataEMOL  PostgreSQLEvangelist  PenguiconOrganizer

Page 3: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

WithPostgreSQLandotherOpenSourcesoftwareEMOLis  AllowingDatacollectionfromEMRsandothersources

  AidinginAdherencetonationalstandards  ProvidingPhysicianandPracticelevelbenchmarking

 DataBrokering  EnablingAutomationofNationalinitiatives,suchastheCMSPQRI

Page 4: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

EMOLPostgreSQLData

  PatientRecords  BillingRecords  LabResults  ClinicalRecords  InventoryManagement  PatientReportedData

Page 5: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

Metadata

  PhysiciansDictations  ScannedDocuments  Images

  XRAYs  MIRIs  CATScans

Page 6: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

MetadataStorage

  ReiserFSwithtailpacking  Eachpractice/doctorhasafolder

  SUNOpenSolaris&ZFS???  LinuxandXFS??? NetappWaffle???

Page 7: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

EMOLSoftwareBuildingBlocks UbuntuLinuxLTS(8.04)  PostgreSQL(8.3)  Perl(5.8.x) WindowsUnifiedDataStorageServer2003(R2)  YesWindows

Page 8: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

EMOLHardwareBuildingBlocks  HPProCurveSwitches

  SupportconsiderablycheaperthanSmartnet

  SonicWallFirewalls  SupportconsiderablycheaperthanSmartnet

  LargenumberofSCSIandSATAHardDrives  iSCSIServersandDAS(DirectAttachedStorage)Systems

Page 9: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

WhyPostgreSQL?

  Capable  RequiredFeatures DatabaseTeamExperience  Security  Community

  DocumentationProject  MailingLists  IRC  EventsLikeThis!

Page 10: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

WhyPerl?

  PracticalExtractionandReportLanguage  DevelopmentteamexperiencedwithPerl  Unix‐centric,andavailableforWindows  Textparsingandnormalizing  IknowitPerlisnotsexylike

  INSERT ‘new_popular_language’ INTO languages;

  Rapidprototyping  Weaklytyped  Interpreted,thoughveryfast  Supportsobjects

Page 11: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

WhoisWhere?

  OSandPostgreSQLbinariesonlocaldisks  RAID1Mirror  15kspindledrives  EXT3

  WALBuffersonlocaldisks  RAID1Mirror  15kspindlespeed  EXT2

  INDEXs  DAS(DirectAttachedStorage)Units  RAID6  10kspindlespeedSCSI  EXT3

  TABLES  MultipleiSCSIServersonSANS  4x1GigabitEthernetInterfacesBonded  8x1TerabyteSATAdrivesperSANNodeRAID6  EXT3

Page 12: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

DataDaily

  Loading10GBdatadailyintoPostgreSQL  Loading10GBmetadatadaily

Page 13: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

DataSize

SELECT relname, (relpages*8)/1024 as MB

FROM pg_class

ORDER BY relpages DESC;

Page 14: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

DataSize

SELECT relname, (relpages*8)/1024 as MB

FROM pg_class

ORDER BY relpages DESC;

Thisdoesnotaccountforpg_toast

Thisdoesprovidemoreprecision

Page 15: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

DataSizeReally

SELECT nspname || '.' || relname AS "relation",

pg_size_pretty(pg_relation_size(nspname || '.' || relname)) AS "size"

FROM pg_class C

LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)

WHERE nspname NOT IN ('pg_catalog', 'information_schema')

AND nspname !~ '^pg_toast'

AND pg_relation_size(nspname || '.' || relname)>0

ORDER BY pg_relation_size(nspname || '.' || relname) DESC

Page 16: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

Howmuchdataarewetalking

  LargestTable:1,844.73GB  SecondLargestTable:1,289.36GB

  LargestIndex:411.91GB  SecondLargestIndex:405.08GB

  TotalDBsizeondisk:16,800.39GB

Page 17: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

BettermakesureweneedthatINDEXselect

indexrelid::regclass as index, relid::regclass as table

from

pg_stat_user_indexes

JOIN pg_index USING (indexrelid)

where

idx_scan = 0 and indisunique is false;

Moredetailsat:

http://people.planetpostgresql.org/xzilla/index.php?/archives/351‐Index‐pruning‐techniques.html

Page 18: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

Runittwiceandmakeitfaster

 Maintaina1/500setofrandomsampledata  ALLquerieshitthatdatabasefirst Onlyoncequeryresultissuccessfulisthequerymovedontoproductiondatabaseserver

Page 19: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

HowdoIsleepatnight

  FirstName  LastNames  SocialSecurityNumbers  BirthDates

 Neededtotrackpeopleovertimeandgeography

Page 20: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

HowdoIsleepatnight

"Bydefault,PostgreSQLisprobablythemostsecurity‐awaredatabaseavailable..."

DatabaseHacker'sHandbook

Page 21: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

ProtectingtheWarehouse

  Simpleprocessesthatarefollowed  IntrusionPrevention&Firewalls  SecurityMonitoring&Management‐MSSP  EncryptedCommunication  IdentityManagement‐Centralizedmanagementofusersandgroups–mitigatesvulnerabilitiesthatoccurduetoinconsistencies

Page 22: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

ProtectingtheWarehouse

  Role‐basedsecurity  Functionseveryplacewecan  Identitydatasymmetricallyencrypted Dataisanonamizedinallbutafewtables  Role‐basedsecurity  Alldataisanonamizedbeforeitissentout

Page 23: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

LessonsLearned

  ServerEthernetCardsarenotallmadethesame

 With100+drivesbereadytoRMAsomedisks  YoucanneverhavetomanyDIMMslots  YoudogetwhatyoupayforwithRAIDcontrollers

  Youcan’thavetobigacacheonyourRAIDcontroller

Page 24: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

MoreLessonsLearned

  pg_resetxlog isnotTHATscary  YoucanneverhavetomanyPCI‐XSlots  Auto‐vacuumisnotalwaysyourfriend

Page 25: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

MoreLessonsLearned

 Worrywhenadevelopersays“Ihaveanidea”  Somemistakesarejusttomuchfuntomakeonlyonce

  Iamusedtohearing“Itseemslikeyouaredoingsomethingfundamentallywrong”

 Neveraskfordirectionsfromatwo‐headedtourist!

‐BigBird

Page 26: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

LookingForward

  Idon’tthinkIneedtoworryaboutPostgreSQLscaling  Sizematters:Yahooclaims2‐petabytedatabaseisworld'sbiggest,busiest

  http://www.computerworld.com/action/article.do?command=viewArticleBasic&taxonomyId=18&articleId=9087918&intsrc=hm_topic

Page 27: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

LookingForward

  GridSQLfromEnterpriseDB  BuiltusingmultiplestandardPostgreSQLservers  OpenSourceProject

Page 28: Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your PostgreSQL...Who am I? Computer Database Geek, just like you Formerly a SysAdmin at

Questions

 Web:http://www.chasingnuts.com  Email:[email protected]  IRC:AaronThulonirc.freenode.org  Jabber:[email protected]  Twitter:@AaronThul  AIM:AaronThul