Aaron Thul Electronic Medical Office Logistics …assets.en.oreilly.com/1/event/12/This is Your...
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/1.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/2.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/4.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/5.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/6.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/7.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/8.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/9.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/10.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/11.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/12.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/13.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/14.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/15.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/16.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/17.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/18.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/19.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/20.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/21.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/22.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/23.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/24.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/25.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/26.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/27.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022043005/5f8a296d1d4ecb0f073348ea/html5/thumbnails/28.jpg)
Questions
Web:http://www.chasingnuts.com Email:[email protected] IRC:AaronThulonirc.freenode.org Jabber:[email protected] Twitter:@AaronThul AIM:AaronThul