{"id":273077,"date":"2016-01-28T10:16:03","date_gmt":"2016-01-28T07:16:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273077"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273077","title":{"rendered":"\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 SELECT COUNT(*) \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 PostgreSQL"},"content":{"rendered":"<p>       \u041a\u0430\u043a \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0437\u0430\u043f\u0440\u043e\u0441\u044b SELECT COUNT(*) \u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 PostgreSQL \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 ~200 000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439:  <\/p>\n<blockquote><p>SELECT COUNT(*) FROM users;<br \/>   count <br \/>   \u2014  205043  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c enable_seqscan:<\/p>\n<pre><code class=\"sql\">SET enable_seqscan TO on; EXPLAIN ANALYZE SELECT COUNT(*) FROM users; <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p> QUERY PLAN <br \/>   \u2014  Aggregate (cost=15813.70..15813.71 rows=1 width=0) (actual time=82.907..82.908 rows=1 loops=1)<br \/>   -&gt; Seq Scan on users (cost=0.00..15296.16 rows=207016 width=0) (actual time=0.014..55.505 rows=205043 loops=1)<br \/>   Planning time: 0.211 ms<br \/>   Execution time: <b>82.967 ms<\/b>  <\/p><\/blockquote>\n<p>  \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e: <b>82.967 ms<\/b>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c enable_seqscan:<\/p>\n<pre><code class=\"sql\">SET enable_seqscan TO off; EXPLAIN ANALYZE SELECT COUNT(*) FROM users; <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p> QUERY PLAN <br \/>   \u2014  Aggregate (cost=20156.95..20156.96 rows=1 width=0) (actual time=117.553..117.554 rows=1 loops=1)<br \/>   -&gt; Bitmap Heap Scan on users (cost=4343.25..19639.41 rows=207016 width=0) (actual time=28.354..92.228 rows=205043 loops=1)<br \/>   Heap Blocks: exact=13226<br \/>   -&gt; Bitmap Index Scan on <i>users_pkey<\/i> (cost=0.00..4291.50 rows=207016 width=0) (actual time=25.247..25.247 rows=229621 loops=1)<br \/>   Planning time: 0.141 ms<br \/>   Execution time: <b>117.724 ms<\/b>  <\/p><\/blockquote>\n<p>  \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e: <b>117.724 ms<\/b>, \u0445\u043e\u0442\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 postgresql \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u043d\u0434\u0435\u043a\u0441 <i>users_pkey<\/i>, \u043d\u043e \u0441\u0442\u0430\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u0443\u0436\u0435.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u0435\u043b\u0438\u043a\u043e.<\/p>\n<p>  \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <b>1ms<\/b>. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c:<\/p>\n<p>  1. \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>\u0422\u0410\u0411\u041b\u0418\u0426\u0410_count_seq<\/b>.<br \/>  2. \u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>rows_count()<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u043c.<br \/>  3. \u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>rows_count_update_trigger()<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 INSERT, DELETE, TRUNCATE.<br \/>  4. \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442:<br \/>   \u2014 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043f\u0440\u0438 INSERT<br \/>   \u2014 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u043f\u0440\u0438 DELETE<br \/>   \u2014 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 TRUNCATE<br \/>  5. \u0432\u043c\u0435\u0441\u0442\u043e SELECT COUNT(*), \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SELECT rows_count(&#8216;\u0422\u0410\u0411\u041b\u0418\u0426\u0410&#8217;)<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<p>  <b>1. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/b><\/p>\n<pre><code class=\"sql\">CREATE SEQUENCE users_count_seq MINVALUE 0 START 0; <\/code><\/pre>\n<p>  <b>2. \u0424\u0443\u043d\u043a\u0446\u0438\u044f rows_count() \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u043c.<\/b><\/p>\n<pre><code class=\"sql\">CREATE OR REPLACE FUNCTION rows_count( \ttablename text,  \tstep int default 0,  \treset bool default false ) RETURNS SETOF bigint LANGUAGE plpgsql AS $$ DECLARE \ttablename_seq text; BEGIN \ttablename_seq := tablename || '_count_seq'; \t-- \u0441\u0431\u0440\u043e\u0441 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \tIF reset IS TRUE THEN \t\tRETURN QUERY EXECUTE ' \t\t\tWITH records AS ( \t\t\t\tSELECT count(*) AS rows_count \t\t\t\tFROM '||tablename||') \t\t\tSELECT setval($1,rows_count+$2) \t\t\tFROM records' \t\tUSING tablename_seq,step; \tELSEIF step = 0 THEN \t\t-- \u0432\u044b\u0432\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \t\tRETURN QUERY EXECUTE ' \t\t\tSELECT last_value  \t\t\tFROM '||tablename_seq; \tELSE \t\t-- \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \t\tRETURN QUERY EXECUTE ' \t\t\tWITH records AS ( \t\t\t\tSELECT last_value AS rows_count \t\t\t\tFROM '||tablename_seq||') \t\t\tSELECT setval($1,rows_count+$2) \t\t\tFROM records' \t\tUSING tablename_seq,step; \tEND IF; END; $$; <\/code><\/pre>\n<p>  <b>3. \u0424\u0443\u043d\u043a\u0446\u0438\u044f rows_count_update_trigger() \u2014 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.<\/b><\/p>\n<pre><code class=\"sql\">CREATE OR REPLACE FUNCTION rows_count_update_trigger() RETURNS TRIGGER LANGUAGE plpgsql AS $$ DECLARE BEGIN \tIF TG_OP = 'INSERT' THEN \t   -- \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 INSERT \t   EXECUTE 'SELECT rows_count($1,+1)' USING TG_RELNAME; \t   RETURN NEW; \tELSEIF TG_OP = 'DELETE' THEN \t   -- \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 DELETE \t   EXECUTE 'SELECT rows_count($1,-1)' USING TG_RELNAME; \t   RETURN OLD; \tELSEIF TG_OP = 'TRUNCATE' THEN \t   -- \u0441\u0431\u0440\u043e\u0441 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 TRUNCATE \t   EXECUTE 'SELECT rows_count($1,0,true)' USING TG_RELNAME; \t   RETURN OLD; \tEND IF; END; $$; <\/code><\/pre>\n<p>  <b>4. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0438\u0433\u0435\u0440\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/b><\/p>\n<pre><code class=\"sql\">CREATE TRIGGER rows_count_update_trigger \tAFTER INSERT OR DELETE ON users \tFOR EACH ROW EXECUTE PROCEDURE rows_count_update_trigger(); CREATE TRIGGER rows_count_reset_trigger \tAFTER TRUNCATE ON users \tFOR EACH STATEMENT EXECUTE PROCEDURE rows_count_update_trigger(); <\/code><\/pre>\n<p>  <b>5. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0435\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SELECT rows_count(&#8216;\u0422\u0410\u0411\u041b\u0418\u0426\u0410&#8217;)<\/b><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u043e\u0441\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0431\u0440\u043e\u0441 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430:  <\/p>\n<blockquote><p>  SELECT rows_count(&#8216;users&#8217;,0,true);<br \/>  rows_count <br \/>   \u2014  205043  <\/p><\/blockquote>\n<p>  \u0412\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0431\u0440\u043e\u0441\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 205043. \u0417\u0430\u043f\u0440\u043e\u0441 SELECT rows_count(&#8216;users&#8217;) \u0432\u0435\u0440\u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 205043.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 SELECT rows_count(&#8216;users&#8217;):<\/p>\n<pre><code class=\"sql\">EXPLAIN ANALYZE SELECT rows_count('users'); <\/code><\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434:  <\/p>\n<blockquote><p> QUERY PLAN <br \/>   \u2014  Result (cost=0.00..5.25 rows=1000 width=0) (actual time=0.242..0.244 rows=1 loops=1)<br \/>   Planning time: 0.033 ms<br \/>   Execution time: <b>0.260 ms<\/b>  <\/p><\/blockquote>\n<p>  <b>\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e: 0.260 ms.<\/b><\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u043f\u043b\u044e\u0441\u043e\u043c \u044f\u0432\u043b\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 SELECT rows_count(&#8216;\u0422\u0410\u0411\u041b\u0418\u0426\u0410&#8217;) \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/276055\/\"> https:\/\/habrahabr.ru\/post\/276055\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041a\u0430\u043a \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0437\u0430\u043f\u0440\u043e\u0441\u044b SELECT COUNT(*) \u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 PostgreSQL \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-273077","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273077"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273077\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}