Parallel Bulk Load 10-15 parallel streams up to 3X load speed
Index-Only Scans Col3ms A Cos table books Title C D Dea Dem 300ms Will There Be Faith? State of Wonder Sphere 18c Flr A H Hea Dead Eyes H I Het The Greatest Music N Stories Never Told Rea S N Skeleton Canyon Res U R The Long Snapper Ska Super Immunity S Sut The Barbary Pirates T Heat Tab Confessions of a The U Prairie Bitch W Uvh Talking Pictures Woz Reggie Jackson
PL/coffee=# CREATE OR REPLACE FUNCTIONpublic.fibonacci(n integer) RETURNS integer LANGUAGE plcoffeeIMMUTABLE STRICTAS $function$fibonacci = (x)-> return 0 if x == 0 return 1 if x == 1 return fibonacci(x-1) + fibonacci(x-2)return fibonacci n$function$;CREATE FUNCTION
Indexing7.1: Generalized Search Tree (GiST)8.1: Generalized Inverted Index (GIN)9.1: K-Nearest Neighbor (KNN)
SP-GiST● Based on “Space-Partitioning Trees”● Faster to read, faster to update than GiST ● Will cause PostGIS 2.1!
SP-GiSTknn=# create index pt_gist_idx on geousing gist(point);CREATE INDEXTime: 36672.283 msSize: 153,124,864knn=# create index pt_spgist_idx on geousing spgist(point);CREATE INDEXTime: 12805.530 ms ~ 3 times faster !Size: 153,788,416 ~ the same size
More Information● Josh Berkus: email@example.com ● www.databasesoup.com● Upcoming Events ● Melbourne pgDay, Monday Feb 5 – 2013.pgday.org.au ● PyPgDay at PyCon 2013 ● pgCon, Ottawa, May 21-25 Text and graphics of this talk are licensed Creative Commons Share-Alike, except where otherwise noted. Most racing photos in the presentation are stock photos which may only be reproduced and reused as a part of this presenstation. Graphs courtesy Robert Haas and Heikki Linnakangas. SP-Gist examples from Oleg Bartunov, PL/v8 and PL/Coffee examples courtesy of Will Leinweber.