<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Zacinający się postgresql]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=108&amp;type=atom"/>
	<updated>2008-11-28T17:16:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=108</id>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=386#p386"/>
			<content type="html"><![CDATA[Hmm. Zawsze to jakieś rozwiązanie, średnio się tylko nadaje dla duuuuzych tabel :). Jak bede w okolicy to na pewno wpadne ale na pivko ;).]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2008-11-28T17:16:32Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=386#p386</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=385#p385"/>
			<content type="html"><![CDATA[Ok. Rozwiązałem problem. Nie wiem co to do końca było ale zrobiłem tak:

pg_dump pec -t muarab_rosliny > 28.11.2008_pec_muarab_rosliny.sql

DROP TABLE muarab_rosliny;

\i 28.11.2008_pec_muarab_rosliny.sql

CZasy już są normalne. 

DZięki rski za POMOC ! Jak będziesz w pobliżu Legionowa to zajrzyj po pivko :)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-28T16:30:33Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=385#p385</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=382#p382"/>
			<content type="html"><![CDATA[Muszę zaznaczyć że do tej pory się tak nie działo, czasy odpowiedzi są takie długie tylko na tej tabeli a jest ich w tej bazie około 120]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-26T11:32:17Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=382#p382</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=381#p381"/>
			<content type="html"><![CDATA[q=# explain analyze SELECT count(id_muarab_przedmiot) FROM muarab_przedmiot;
                                                         QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=1999.90..1999.91 rows=1 width=4) (actual time=217.278..217.279 rows=1 loops=1)
   ->  Seq Scan on muarab_przedmiot  (cost=0.00..1859.72 rows=56072 width=4) (actual time=0.012..143.361 rows=56924 loops=1)
 Total runtime: 217.389 ms
(3 rows)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-26T11:30:29Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=381#p381</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=380#p380"/>
			<content type="html"><![CDATA[q=# explain analyze SELECT count(id_muarab_rosliny) FROM muarab_rosliny;
                                                           QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=353300.05..353300.06 rows=1 width=4) (actual time=48656.152..48656.153 rows=1 loops=1)
   ->  Seq Scan on muarab_rosliny  (cost=0.00..353200.84 rows=39684 width=4) (actual time=405.285..48602.345 rows=40612 loops=1)
 Total runtime: 48656.311 ms
(3 rows)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-26T11:28:26Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=380#p380</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=379#p379"/>
			<content type="html"><![CDATA[Tzn zwiększyłem :

max_fsm_pages (20000) do 50000 tylko jeszcze musze doczytać co to robi :)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-26T09:21:46Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=379#p379</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=378#p378"/>
			<content type="html"><![CDATA[Widać, że po odkurzeniu bazy plan jest lepszy. Ja bym sie zastanowil nad
[quote]NOTICE:  number of page slots needed (30992) exceeds max_fsm_pages (20000)
PODPOWIEDŹ:  Consider increasing the configuration parameter "max_fsm_pages" to a value over 30992.[/quote]
A wykonaj jeszcze polecenia
[code]explain analyze SELECT count(id_muarab_rosliny) FROM muarab_rosliny;

explain analyze SELECT count(id_muarab_przedmioty) FROM muarab_przedmioty;[/code]]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2008-11-26T07:14:14Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=378#p378</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=377#p377"/>
			<content type="html"><![CDATA[q=# explain SELECT count(id_muarab_przedmiot) FROM muarab_przedmiot;
                                 QUERY PLAN
-----------------------------------------------------------------------------
 Aggregate  (cost=1999.90..1999.91 rows=1 width=4)
   ->  Seq Scan on muarab_przedmiot  (cost=0.00..1859.72 rows=56072 width=4)
(2 rows)

q=# explain SELECT count(id_muarab_rosliny) FROM muarab_rosliny;
                                 QUERY PLAN
-----------------------------------------------------------------------------
 Aggregate  (cost=353300.05..353300.06 rows=1 width=4)
   ->  Seq Scan on muarab_rosliny  (cost=0.00..353200.84 rows=39684 width=4)
(2 rows)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-25T23:21:30Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=377#p377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=376#p376"/>
			<content type="html"><![CDATA[q=# vacuum analyze;
NOTICE:  number of page slots needed (30992) exceeds max_fsm_pages (20000)
PODPOWIEDŹ:  Consider increasing the configuration parameter "max_fsm_pages" to a value over 30992.
VACUUM]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-25T23:20:20Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=376#p376</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=375#p375"/>
			<content type="html"><![CDATA[Pierwszy raz:

q=# explain SELECT count(id_muarab_rosliny) FROM muarab_rosliny;
                                   QUERY PLAN
--------------------------------------------------------------------------------
 Aggregate  (cost=596901.02..596901.03 rows=1 width=4)
   ->  Seq Scan on muarab_rosliny  (cost=0.00..547800.01 rows=19640401 width=4)

q=# explain SELECT count(id_muarab_przedmiot) FROM muarab_przedmiot;
                                  QUERY PLAN
------------------------------------------------------------------------------
 Aggregate  (cost=2676.80..2676.81 rows=1 width=4)
   ->  Seq Scan on muarab_przedmiot  (cost=0.00..2401.24 rows=110224 width=4)]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-25T22:01:41Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=375#p375</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=374#p374"/>
			<content type="html"><![CDATA[??
Spodziewalem sie wynikow polecen

[code]explain SELECT count(id_muarab_rosliny) FROM muarab_rosliny;

explain SELECT count(id_muarab_przedmioty) FROM muarab_przedmioty;[/code]
Zrob tez 
[code]vacuum analyze;[/code]
i jeszcze raz explain'y]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2008-11-25T18:02:55Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=374#p374</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=373#p373"/>
			<content type="html"><![CDATA[Hmmm próbowałem tak:

muarab=# EXPLAIN SET STATEMENT_ID = ‘z1’ FOR Select login,email from user_cfg where a IN ('A');                                              ERROR:  syntax error at or near "SET" znak 9
LINE 1: EXPLAIN SET STATEMENT_ID = ‘z1’ FOR Select login,email from ...

ale coś nie idzie.]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-25T15:38:54Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=373#p373</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=368#p368"/>
			<content type="html"><![CDATA[Pokaz plan wykonania polecenia.]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2008-11-14T16:02:43Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=368#p368</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Zacinający się postgresql]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=367#p367"/>
			<content type="html"><![CDATA[Mam zainstalowanego  postgresql(8.1.11) na centos 5.1.

Wszytko niby działa poprawnie ale:

Gdy włączam zapytanie:

SELECT count(id_muarab_rosliny) FROM muarab_rosliny; (odpowiedzi: 27891 po 35 sekndach)

SELECT count(id_muarab_przedmioty) FROM muarab_przedmioty; (odpowiedzi: 48990 po 2 sekndach)

No właśnie z kąd ta różnica ?? W skryptach PHP jest tak samo wszędzie gdzie użyję muarab_rosliny skrypt "Wisi" ok 70 sekund a gdy jest użyta tabela przedmioty skrypt generuje się 0,06 s .

Obie tabele są prawie identyczne różnią się końcówką nazwy.]]></content>
			<author>
				<name><![CDATA[zbytnik]]></name>
				<email><![CDATA[zbytnik@m67.org]]></email>
				<uri>https://forum.postgresql.org.pl/profile.php?id=425</uri>
			</author>
			<updated>2008-11-14T14:25:46Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=367#p367</id>
		</entry>
</feed>
