threads
listlengths
1
275
[ { "msg_contents": "I have one query which does not run very often. Sometimes it may be\nmonths between runs.\nHowever, when it does get executed, it scans approximately 100\nidentically-structured tables (a form of partitioning), extracts and\ngroups on a subset of the columns, and creates a new table. The\nind...
[ { "msg_contents": "Hi folks,\n\nI'm running PG 8.3.15 on an itanium box and was seeing lots of \nfloating-point assist faults by the kernel. Searched around, found a \ncouple references/discussions here and there:\n\nhttp://archives.postgresql.org/pgsql-general/2008-08/msg00244.php\nhttp://archives.postgresql.o...
[ { "msg_contents": "I have two queries in PG 9.1. One uses an index like I would like, the other does not. Is this expected behavior? If so, is there any way around it? \n\n\npostgres=# explain analyze select min(id) from delayed_jobs where strand='sis_batch:account:15' group by strand;\n ...
[ { "msg_contents": "Hello,\n\nI'm going to be testing some new hardware (see http://archives.postgresql.org/pgsql-performance/2011-11/msg00230.php) and while I've done some very rudimentary before/after tests with pgbench, I'm looking to pull more info than I have in the past, and I'd really like to automate thi...
[ { "msg_contents": "Hey there,\r\n\r\n \r\nWe are looking at beefing up our servers with SSD's. Some of you did some interesting tests with the Intel 320. So the idea came to make a RAID10 with four 600GB models.\r\n\r\n \r\nI did however do some calculations with the current database server (220GB database, exp...
[ { "msg_contents": "Hi,\n\nMy application is performing 1600 inserts per second and 7 updates per\nsecond. The updates occurred only in a small table which has only 6 integer\ncolumns. The inserts occurred in all other daily tables. My application\ncreates around 75 tables per day. No updates/deletes occurred in...
[ { "msg_contents": "Very Fast Version:\n\nRecently my database stopped respecting one of my indexes, which took a query that should run in \"subsecond response time\" and turning it into something that with small data sets runs in the 7-10 minute range and with large data sets runs in the 30 minute - eternity ra...
[ { "msg_contents": "Is here any reason why Postgresql calculates subqueries/storable procedures\nin select list before applying ORDER BY / LIMIT?\n\nI talking about cases like:\n\nSELECT *,\n(some very slow subquery or slow storable stable/immutable procedure like\nxml processing)\nFROM\nsome_table\nORDER BY\nso...
[ { "msg_contents": "hello to all,\n\ni would like your advice on the following matter. i have a table with 150\nmillion rows. there are some indexes on this table but the one that is\nreally important is one that has 3 columns (a,b,c). one application\nconstantly makes queries and the query planner uses this ind...
[ { "msg_contents": "Hi All,\n\nI have a table with 665605 rows (counted, vacuum-ed):\nCREATE TABLE unique_words\n( filename text NOT NULL,\n filetype text NOT NULL,\n word text NOT NULL,\n count integer,)\n\nThe query is:\nselect f.word , count(f.word) from \nunique_words as f, \nunique_words as s ,\nunique_w...
[ { "msg_contents": "dear all,\n\ni am trying to understand if i am missing something on how vacuum works. i\nve read the manual, and did some research on the web about that but i am\nstill not sure. \n\nto my understanding, vacuum just marks the dead rows of a table so that from\nthat point on that space would b...
[ { "msg_contents": "Experts,\n\nQuick Summary: data can now be inserted very quickly via COPY + removing\nindexes, but is there a design or some tricks to still allow someone to\nquery while the partition is still active and 'hot' ?\n\n- Postgres 9.1\n- Windows 7 (64-bit) , although this is just for the current ...
[ { "msg_contents": "> We now found (thanks Andres and Snow-Man in #postgresql) that in our\n> tests, after the indexes get too large performance drops signficantly\n> and our system limps forward due to  disk reads (presumably for the\n> indexes).  If we remove the indexes, performance for our entire sample\n> t...
[ { "msg_contents": "Hi all,\n\nI found this presentation from B. Momjian:\n\nhttp://momjian.us/main/writings/pgsql/performance.pdf\n\nI'm interested in what he said about \" Intersect/Union X AND/OR \" , Can I\nfind a transcription or a video of this presentation? Can anyone explain it\nto me?\n\nThanks,\n\nThi...
[ { "msg_contents": "Hi friends\n\nI want to know if it's possible to predict (calculate), how long a\nVACUUM FULL process will consume in a table?\n\ncan I apply some formula to calculate this?\n\nthanks\n\n\n\n-- \n----------------------------------------------------------\nVisita : http://www.eqsoft.net\n-----...
[ { "msg_contents": "So we are making progress on our performance issues, we are splitting\nthe data, changing the index value etc. So far having some success,\nbut we also want to test out some of the options and changes in the 9\nbranch, but trying to dump and restore 750gb of data is not all that\nfun, so I'm...
[ { "msg_contents": "hello to all,\n\nthe situation i am facing is this->\ntable X-> 200 mil rows\nindex A (date, columnA)\nindex B (date,columnB,columnC)\n\nthe query planner is working properly and for a specific query that selects\nfrom table X where all 3 columns of index B are set, it uses index B.\n\nbut, a...
[ { "msg_contents": "Ernesto Quiñones wrote:\n> Scott Marlowe wrote:\n>> Ernesto Quiñones wrote:\n \n>>> I want to know if it's possible to predict (calculate), how long\n>>> a VACUUM FULL process will consume in a table?\n \nI don't think you said what version of PostgreSQL you're using. \nVACUUM FULL prior to...
[ { "msg_contents": "I have a fairly simple query:\n\nSELECT <some columns>\nFROM \"tubesite_image\"\nINNER JOIN \"tubesite_object\"\n\tON (\"tubesite_image\".\"object_ptr_id\" = \"tubesite_object\".\"id\")\nWHERE\n\t\"tubesite_object\".\"site_id\" = 8\nORDER BY\n\t\"tubesite_object\".\"pub_date\" ASC LIMIT 21;\n...
[ { "msg_contents": "Hi all,\n\n\nI am running a load simulation on Debian with PostgreSQL 8.4.9 (standard\nDebian package).\n\nCertain number of clients do the following stepsin a transaction (read\ncommited level) periodically (about 1.1 transaction per second / client)\nand concurrently:\n\n-reads a record of...
[ { "msg_contents": "Hi there,\r\n\r\n \r\n\r\n \r\n \r\n\r\nCurrently, we are running into serious performance problems with our paritioning setup, because index lookups are mostly done on allpartions, in stead of the one partition it should know that it can find the needed row.\r\n\r\n \r\n\r\n \r\n \r\n\r\nSim...
[ { "msg_contents": "Hello, I have a postgres 9.0.2 installation.\n\nEvery works fine, but in some hours of day I got several timeout in my\napplication (my application wait X seconds before throw a timeout).\n\nNormally hours are not of intensive use, so I think that the autovacuum\ncould be the problem.\n\n \n\...
[ { "msg_contents": "Well thought it was maybe just going from 8.4.4 to 9.1.1 so upgraded\nto 8.4.9 and tried pg_upgrade again (this is 64bit) and it's failing\n\n-bash-4.0$ /tmp/pg_upgrade --check --old-datadir \"/data/db\"\n--new-datadir \"/data1/db\" --old-bindir \"/ipix/pgsql/bin\" --new-bindir\n\"/ipix/pgsql...
[ { "msg_contents": "Hello All.\nWe recently upgrade our server from PG8.2 to 8.4.\nOur current version is:\ndatabase=> SELECT version();\n \nversion \n--------------------------------------------------------...
[ { "msg_contents": "Hi all,\n\nI'm trying to figure out some common slow queries running on the server, by\nanalyzing the slow queries log.\n\nI found debug_print_parse, debug_print_rewritten, debug_print_plan, which\nare too much verbose and logs all queries.\n\nI was thinking in something like a simple explain...
[ { "msg_contents": "I was experimenting with a few different methods of taking a line of\ntext, parsing it, into a set of fields, and then getting that info\ninto a table.\n\nThe first method involved writing a C program to parse a file, parse\nthe lines and output newly-formatted lines in a format that\npostgre...
[ { "msg_contents": "I have a couple of tables with about 400millions of records increasing about\n5 millions per day.\n\n \n\nI think that disabling autovac over those tables, and enabling daily manual\nvacuum (in some idle hour) will be better.\n\n \n\nI am right?\n\n \n\nIs possible to exclude autovacuum over ...
[ { "msg_contents": "Hello, I wanted to ask according such a problem which we had faced with.\nWe are widely using postgres arrays like key->value array by doing like \nthis:\n\n{{1,5},{2,6},{3,7}}\n\nwhere 1,2,3 are keys, and 5,6,7 are values. In our pgSql functions we \nare using self written array_input(array:...
[ { "msg_contents": "I've got a 5GB table with about 12 million rows.\nRecently, I had to select the distinct values from just one column.\nThe planner chose an index scan. The query took almost an hour.\nWhen I forced index scan off, the query took 90 seconds (full table scan).\n\nThe planner estimated 70,000 un...
[ { "msg_contents": "for example, the where condition is: where 'aaaa' ~ col1. I created a \nnormal index on col1 but seems it is not used.\n", "msg_date": "Thu, 15 Dec 2011 00:05:31 +0800", "msg_from": "Rural Hunter <ruralhunter@gmail.com>", "msg_from_op": true, "msg_subject": "Is it possible to ...
[ { "msg_contents": "Forwarding this on from someone who may pop up on the list too. This is \na new server that's running a query slowly. The rate at which new \nsemops happen may be related. OS is standard RHEL 5.5, kernel \n2.6.18-194.32.1.el5. One possibly interesting part is that this is \nleading edge h...
[ { "msg_contents": "I have a query that used <> against an indexed column. In this\ncase I can use the reverse and use in or = and get the performance\nI need... but \"in general\"... will the planner ever use an index when \nthe related column is compared using <>?\n\nI feel like the answer is no, but wanted to...
[ { "msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nHello\n\nI am sending this email to ask if anyone has noticed a change in how\na server running postgreSQL 9.1 uses and allocates memory compared to\nolder versions.\n\nWe upgraded all our systems from 8.3 to 9.1 a couple of weeks ago, and\nwe...
[ { "msg_contents": "Hi - I'm running into an OOM-killer issue when running a specific query (no\nvirtual machine running) and, based on researching the issue, I can\nprobably fix by making the following sysctl adjustments:\n vm.overcommit_memory = 2\n vm.overcommit_ratio = 0\nHowever, I am perplexed as to ...
[ { "msg_contents": "SOLVED\nOn Tue, Dec 20, 2011 at 3:46 PM, Tom Lane - tgl@sss.pgh.pa.us\n<+nabble+miller_2555+c5a65c2e1a.tgl#sss.pgh.pa.us@spamgourmet.com>\nwrote:\n> nabble.30.miller_2555@spamgourmet.com writes:\n>> I've run EXPLAIN on the query, but AFAICS the query plan does not\n>> appear significantly dif...
[ { "msg_contents": "I have IBM x3560 with 2G RAM - RAID 5 3 disk - PostgreSQL 9.0.6 64bit on\nWindows 2003 64bit\nI had read some tuning guide, it recomment not use RAID 5. So Raid 5 is\nbestter than 3 disk independent or not.\n\nHere is my pgbench -h %HOST% -p 5433 -U postgres -c 10 -T 1800 -s 10\npgbench\n\npg...
[ { "msg_contents": "I'd like to find some measurements/figures of query preparation and\nplanning time to justify the use of prepared statements and stored\nprocedures.\nI know that complex queries have larger preparation time. Though, is it\npossible to explicitly measure the time the optimizer spends parsing a...
[ { "msg_contents": "Hello,\n\n I'm running a fairly complex query on my postgres-8.4.9 Ubuntu box. The box has 8-core CPU, 18G of RAM and no virtualization layer. The query takes many hours to run. The query essentially involves a join of two large tables on a common string column, but it also includes joins wit...
[ { "msg_contents": "there are some performance issues on a server and by searching in the logs i\nnoticed that the phases of parse and bind take considerably more time than\nexecute for most of the queries. i guess that the right thing to do in this\ncase is to use functions or prepare statements but in any case...
[ { "msg_contents": "PostgreSQL 9.0.2\nMac OS X Server 10.6.8\nAutovacuum is on, and I have a script that runs vacuum analyze verbose every night along with the backup.\n\nI have a situation where I'm experiencing a seq scan on a table with almost 3M rows when my condition is based on a subquery. A google search...
[ { "msg_contents": "I am doing POC on Posgtresql replication. I am using latest version of\npostgresql i.e. 9.1. There are multiple replication solutions avaliable in\nthe market (PGCluster, Pgpool-II, Slony-I). Postgresql also provide in-built\nreplication solutions (Streaming replication, Warm Standby and hot ...
[ { "msg_contents": "MirrorX wrote:\n \n> -the table is this ->\n> \\d configurations\n> Table \"public.configurationcontext\"\n \nOne of my concerns was that you might actually be selecting against a\nview rather than a table, and the above doesn't reassure me that\nyou're not. Why the difference between \"con...
[ { "msg_contents": "Hi,\n\nI have a two tables that are partitioned by month.\n\nI have different results for the same query (query A/query B), the only thing that differ from A and B is the customer id.\n\n\nQuery A:\n\nSELECT sms.id AS id_sms\n                             \n                      FROM \n       ...
[ { "msg_contents": "Hi all!\n\nI've ran into a performance problem a few time ago and I've been trying \nto figure out a solution until now. But since I've failed to come up \nwith anything conclusive, it's time to ask some help from people with \nmore understanding of how postgresql works.\n\nHere's the big pic...
[ { "msg_contents": "I gather that a big part of making queries performant is making sure the \nplanner's estimates reflect reality.\n\nGiven a random explain analyze line:\n\nLimit (cost=0.02..943.11 rows=50 width=16) (actual time=0.603..79.729 \nrows=50 loops=1)\n\nwhich is the truer statement?\n\n1. As long a...
[ { "msg_contents": "Hello,\n\nI've a table with approximately 50 million rows with a schema like \nthis:\n\n id bigint NOT NULL DEFAULT nextval('stats_5mn'::regclass),\n t_value integer NOT NULL DEFAULT 0,\n t_record integer NOT NULL DEFAULT 0,\n output_id integer NOT NULL DEFAULT 0,\n count ...
[ { "msg_contents": "hi,\n\nMaybe these thoughts could help....\n\n1) order by those three columns in your select min query could force\nindex usage...\n\n2) or\n\nDELETE FROM table\nWHERE EXISTS(SELECT id FROM table t WHERE t.id > table.id AND t.col1 =\ntable.col1 AND t.col2 = table.col2 AND col3 = table.col3)\n...
[ { "msg_contents": "If solution with temp table is acceptable - i think steps could be\nreduced...\n\n• copy to temp_imp ( temp table does not have id column)\n\n• update live set count = temp_imp.count from temp_imp using (\ncol1,col2,col3)\n\n• insert into live from temp where col1, col2 and col3 not exists in...
[ { "msg_contents": "It was not query... Just sentence where some index values in one table\nnot exist in another...\n\nSo query could be with:\n• WHERE (col1,col2,col2) NOT IN\n• WHERE NOT EXISTS\n• LEFT JOIN live USING (col1,col2,col2) WHERE live.id IS NULL\n\nwhat ever whoever prefer more or what gives better ...
[ { "msg_contents": "Some info:\nPostgreSQL version: 9.1.2\n\nTable \"cache\":\nRows count: 3 471 081\nColumn \"tsv\" tsvector\nIndex \"cache_tsv\" USING gin (tsv)\n\nIf i do query like THIS:\n\n*SELECT id FROM table WHERE tsv @@ to_tsquery('test:*');*\nIt uses index and returns results immediately:\n\nexplain an...
[ { "msg_contents": "Some info:\nPostgreSQL version: 9.1.2\n\nTable \"cache\":\nRows count: 3 471 081\nColumn \"tsv\" tsvector\nIndex \"cache_tsv\" USING gin (tsv)\n\nIf i do query like THIS:\n\n*SELECT id FROM table WHERE tsv @@ to_tsquery('test:*');*\nIt uses index and returns results immediately:\n\nexplain an...
[ { "msg_contents": "We have a set of large tables. One of the columns is a status indicator\n(active / archived). The queries against these tables almost always\ninclude the status, so partitioning against that seems to makes sense from\na logical standpoint, especially given most of the data is \"archived\" a...
[ { "msg_contents": "----- Original Message -----\n> From: \"Robert Haas\" <robertmhaas@gmail.com>\n\nHi Robert,\n\nI solved the problem by modifying the query:\n\nbefore:\n                   ORDER BY dlr.timestamp_todeliver DESC LIMIT\n\nafter:\n                   ORDER BY sms.timestamp_todeliver DESC LIMIT\n\nm...
[ { "msg_contents": "Hi all,\n\nI've run a series fo pgbench benchmarks with the aim to see the effect\nof moving the WAL logs to a separate drive, and one thing that really\nsurprised me is that the archive log level seems to give much better\nperformance than minimal log level.\n\nOn spinning drives this is not...
[ { "msg_contents": "Hi, \n\nyesterday I delete about 200 million rows of a table (about 150GB of data),\nafter delete completes the autovacuum process start.\n\nThe autovacuum is running for about 11 hours but no space is released\n\nAutovacuum parameters are with default values in postgresql.conf\n\n \n\nThe po...
[ { "msg_contents": "Hi,\n\nIs there a simple way (or a tool) to discover the most searched values \nin a field from a table ?\n\nIn the pg_stats, I can see the most common values generated by ANALYZE, \nbut I want to know how many queries are using this values. With this \ninformation and the other statistics, I...
[ { "msg_contents": "Hi,\n\nwhen benchmarking insert , can there be caching effects?\ni insert, delete again, and insert again.\ndoes anything cache the things that i deleted?\n\n(postgres 8.4 on debian)\n\ncheers,\n\nWBL\n\n-- \n\"Patriotism is the conviction that your country is superior to all others\nbecause ...
[ { "msg_contents": "Hi,\n\nI'm working on a benchmark that demonstrates the effects of moving\ntables or indexes to separate devices (SSD and HDD), and one thing that\nreally caught my eye are spikes in the tps charts. See this:\n\n http://www.fuzzy.cz/tmp/data-indexes/indexes.html\n\nThe first one is a databas...
[ { "msg_contents": "Hi folks\n\nThis could be a sheer volume issue, but I though I would ask the wisdom of\nthis forum as to next investigative steps.\n\n----\n\nWe use PostgreSQL 8.4.4 which is bundled with our application as a VMware\nvirtual appliance. The bulk of the app's database activity is recording\nper...
[ { "msg_contents": "We are migrating our Oracle warehouse to Postgres 9.\n\nThis function responds well:\n\npg=# select public.getMemberAdminPrevious_sp2(247815829, 1,'test.email@hotmail.com', 'email', 'test');\n getmemberadminprevious_sp2 \n----------------------------\n <unnamed portal 1>\n(1 row)\n\nTime: 7.5...
[ { "msg_contents": "Hi Everyone\n\nI just want to illustrate an idea may possible for bringing up\nparallel process in PostgreSQL at SQL-Query level\n\nThe PARALLEL option in Oracle really give great improvment in\nperformance, multi-thread concept has great possibilities\n\nIn Oracle we have hints ( see below )...
[ { "msg_contents": "Assuming there was some sort of cost to pl/pgsql, I rewrote a bunch of\nstored functions s in straight SQL. Each stored proc was calling the next,\nso to get the full effect I had to track down all the pl/pgsql stored\nfunctions and convert them to sql. However, I was surprised to find after\...
[ { "msg_contents": "Hi,\n\nWe are having an embedded system with a freescale m68k architecture based micro-controller, 256MB RAM running a customized version of Slackware 12 linux.\nIt's a relatively modest Hardware.\nWe have installed postgres 9.1 as our database engine. While testing, we found that the Postgre...
[ { "msg_contents": "Let's say I have a 7GB table with 3-4 indices for a total of 10-12GB.\nFurthermore, let's say I have a machine with sufficient memory for me\nto set the work_mem and maintenance_work_mem to 20GB (just for this\nsession).\nWhen I issue a CLUSTER using one of the indices, I see PostgreSQL (by\...
[ { "msg_contents": "Hi list,\n\nI am running PostgreSQL 8.1 (CentOS 5.7) on a VM on a single XCP (Xenserver) host.\nThis is a HP server with 8GB, Dual Quad Core, and 2 SATA in RAID-1.\n\nThe problem is: it's running very slow compared to running it on bare metal, and\nthe VM is starving for I/O bandwidht, so oth...
[ { "msg_contents": "Hi all,\n\nI am using Postgresql database for our project and doing some\nperformance testing. We need to insert millions of record with indexed\ncolumns. We have 5 columns in table. I created index on integer only\nthen performance is good but when I created index on text column as\nwell the...
[ { "msg_contents": "So, here's the query:\n\nSELECT private, COUNT(block_id) FROM blocks WHERE created > 'yesterday' AND\nshared IS FALSE GROUP BY private\n\nWhat confuses me is that though this is a largish table (millions of rows)\nwith constant writes, the query is over indexed columns of types timestamp\nand...
[ { "msg_contents": "Hello all,\n\nJust wanted to share some results from some very basic benchmarking\nruns comparing three disk configurations on the same hardware:\n\nhttp://morefoo.com/bench.html\n\nBefore I launch into any questions about the results (I don't see\nanything particularly shocking here), I'll d...
[ { "msg_contents": "Hello, \n\nI have a weird table, upon with the queries are much faster when no\nstatics were collected. \n\nIs there a way to delete statistics information for a table ?\nI've tried ALTER.. set STATISTICS 0 and then run ANALYZE, but it seems\nthat old statistics are kept this way.\nCan I dele...
[ { "msg_contents": "My slow query today is somewhat more complex than yesterday's, but I'm\nhopeful it can be improved. Here's the query:\n\nSELECT relname, emotion, COUNT(feedback_id) FROM pg_class, moments\nJOIN emotions USING (moment_id)\nWHERE moments.inserted > 'today' AND moments.tableoid = pg_class.oid\nG...
[ { "msg_contents": "Hi,\n\nI have a table in Postgres like:\nCREATE TABLE test\n(\n id integer,\n dtstamp timestamp without time zone,\n rating real\n)\nCREATE INDEX test_all\n ON test\n USING btree\n (id , dtstamp , rating);\n\nMy db has around 200M rows and I have reduced my test select statement down\nt...
[ { "msg_contents": "I created a table with two columns: an id SERIAL (primary key) and a\ntext (not null), and then added a unique index on the text field.\nThen I ran the following query (with a huge work_mem - 20GB):\n\ninsert into tableA (text_field) select distinct other_text_field from\nsome_huge_set_of_tab...
[ { "msg_contents": "Saurabh wrote:\n \n> wal_buffers = 5MB\n \nAs as already been suggested, use 16MB (or if the version you're\nusing supports it, the default of -1);\n \n> autovacuum = off\n \nIf the only activity while this is off is a bulk load, that might be\nOK, but be sure *not* to leave this off. You w...
[ { "msg_contents": "Hi all,\n\nI've been running a lot of benchmarks recently (I'll publish the results\nonce I properly analyze them). One thing I'd like to demonstrate is the\neffect of direct I/O when the wal_fsync_method is set to\nopen_sync/open_datasync.\n\nI.e. I'd like to see cases when this improves/hur...
[ { "msg_contents": "Hello,\n\nI have quite systematically better performance with the text search when\nI disable the statistics collection for the tsvector column.\nSo I wonder if such statistics ever make sense.\n\nHere a testcase:\n\nThe table contains 200'000 tsvector, whereas the lexeme 'fooblablabla'\nexis...
[ { "msg_contents": "Hi all,\n\nWe are currently \"stuck\" with a performance bottleneck in our server using PG and we are thinking of two potential solutions which I would be happy to hear your opinion about.\n\nOur system has a couple of tables that hold client generated information. The clients communicate ev...
[ { "msg_contents": "Ofer Israeli wrote:\n \n> Our system has a couple of tables that hold client generated\n> information. The clients communicate every minute with the server\n> and thus we perform an update on these two tables every minute. We\n> are talking about ~50K clients (and therefore records).\n> \n> ...
[ { "msg_contents": "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2\n20080704 (Red Hat 4.1.2-51), 64-bit\n\nDedicated DB server\n\n4GB ram\n\nShared_Buffers = 1 GB\n\nEffective_cache_size = 3GB\n\nWork_mem = 32GB\n\nAnalyze done\n\nQueries ran multiple times, same differences/results\n\...
[ { "msg_contents": "Per the thread from last month, I've updated the default\nrandom_page_cost on Heroku Postgres to reduce the expected cost of a\nrandom_page on all new databases.\n\nThanks to everyone who helped come to this conclusion!\n\nPeter\n\n-- \nPeter van Hardenberg\nSan Francisco, California\n\"Every...
[ { "msg_contents": "Hi there,\n\nWe've got a pretty large table that sees millions of new rows a day, and\nwe're trying our best to optimize queries against it. We're hoping to find\nsome guidance on this list.\n\nThankfully, the types of queries that we perform against this table are\npretty constrained. We nev...
[ { "msg_contents": "Hi all,\n\nWe have a 4-columned table that is also split up into a TOAST table, where the TOASTed entries are ~35KB each.\nThe table size is 10K records.\nThe table is updated at a rate of ~100 updates a minute.\n\nDuring our testing we see that the table size increases substantially. When l...
[ { "msg_contents": "Here's my query:\n\nSELECT foursquare.name, foursquare.city, COUNT(moment_id) AS popularity\nFROM foursq_categories\nJOIN foursquare USING (foursq_id)\nJOIN places USING (foursq_id)\nJOIN blocks USING (block_id)\nWHERE \"primary\"\n AND (created at time zone timezone)::date = 'yesterday'\n ...
[ { "msg_contents": "Yeah, Reply-All...\n\nBegin forwarded message:\n\n> From: David Yeu <david.yeu@skype.net>\n> Subject: Re: [PERFORM] Performance on large, append-only tables\n> Date: February 10, 2012 10:59:04 AM EST\n> To: Merlin Moncure <mmoncure@gmail.com>\n> \n> On Feb 10, 2012, at 10:19 AM, Merlin Moncur...
[ { "msg_contents": "Hi,\n\nI am checking a performance problem encountered after porting old embeded\nDB to postgreSQL. While the system is real-time sensitive, we are\nconcerning for per-query cost. In our environment sequential scanning\n(select * from ...) for a table with tens of thousands of record costs 1 ...
[ { "msg_contents": "Hello,\n\nI'm working on a system that detects changes in someone's filesystem.\nWe first scan the entire filesystem which is dumped into the table \n'filesystem' containing the full_path of every file and it's \ncorresponding md5 hash.\nWe then do subsequent scans of the filesystem which are...
[ { "msg_contents": "hi all\n\nIn my query I have two tables (edges 3,600,000 tuples and nodes 1,373,00 tuples), where I want to obtain all edges,whose target vertex is within a given euclidean range starting from a query point q:\n\nthe query is formulated as following:\nSELECT \n E.ID, E.SOURCE,E.SOURCE_MODE,E...
[ { "msg_contents": "Comparing\nSELECT DISTINCT(user_id) FROM blocks JOIN seen_its USING (user_id) WHERE\nseen_its.created BETWEEN (now()::date - interval '8 days')::timestamp AND\nnow()::date::timestamp\nto\nSELECT DISTINCT(user_id) FROM seen_its WHERE created BETWEEN (now()::date -\ninterval '8 days')::timestam...
[ { "msg_contents": "Hello all!\n\nI have a very simple query that I am trying to wrap into a function:\n\nSELECT gs.geo_shape_id AS gid,\ngs.geocode\nFROM geo_shapes gs\nWHERE gs.geocode = 'xyz'\nAND geo_type = 1\nGROUP BY gs.geography, gs.geo_shape_id, gs.geocode;\n\nThis query runs in about 10 milliseconds.\n\...
[ { "msg_contents": "Hello all!\n\nI have a very simple query that I am trying to wrap into a function:\n\nSELECT gs.geo_shape_id AS gid,\ngs.geocode\nFROM geo_shapes gs\nWHERE gs.geocode = 'xyz'\nAND geo_type = 1\nGROUP BY gs.geography, gs.geo_shape_id, gs.geocode;\n\nThis query runs in about 10 milliseconds.\n\...
[ { "msg_contents": "Hi all,\n\nIn performance testing we're doing we are currently running two scenarios:\n\n 1. Starting from an empty db, therefore all operations are INSERTs.\n 2. Starting from an existing db - thereby UPDATing all records.\n\nI should also mention that the tables we are dealing with are he...
[ { "msg_contents": "New question regarding this seen_its table: It gets over 100 inserts per\nsecond. Probably many more if you include every time unique_violation occurs.\nThis flood of data is constant. The commits take too long (upwards of 100\nms, ten times slower than it needs to be!) What I'm wondering is ...
[ { "msg_contents": "I have a database where I virtually never delete and almost never do\nupdates. (The updates might change in the future but for now it's okay to\nassume they never happen.) As such, it seems like it might be worth it to\nset autovacuum=off or at least make it so vacuuming hardly ever occurs.\n...
[ { "msg_contents": "Hi, everyone. I'm maintaining an application that exists as a \"black \nbox\" in manufacturing plants. The system is based on Windows, .NET, and \nPostgreSQL 8.3. I'm a Unix kind of guy myself, but the application \nlayer and system administration are being handled by other people; I'm \nj...
[ { "msg_contents": "Hello,\n\nI am trying to understand the analysis behind the \"cost\" attribute in\nEXPLAIN output.\n\npostgres = # explain select * from table_event where seq_id=8520960;\n\n\n QUERY PLAN\n-----------------------------------------------------------------...
[ { "msg_contents": "Hi All,\n\nI am trying to compile Postgres Source code for ARM cortex A8 architecture.\nWhile compiling, I got an error message which read \"selected processor does not support `swpb r4,r4,[r3]' \"\nOne of the Postgres forums at the location \"http://postgresql.1045698.n5.nabble.com/BUG-6331-...
[ { "msg_contents": "We are experiencing an unusual slowdown when using UUID field in JOIN when\nupdating a table. SQL looks like this:\n\nUPDATE dst\nSET data_field = src.data_field\nFROM src\nWHERE dst.uuid_field = src.uuid_field;\n\nThis statement takes over 6 times longer than a similar statement against\nthe...
[ { "msg_contents": "Hi,\n\n2011/10/24 Stephen Frost <sfrost@snowman.net> wrote\n> Now, we've also been discussing ways to have PG automatically\n> re-populate shared buffers and possibly OS cache based on what was in\n> memory at the time of the last shut-down, but I'm not sure that would\n> help your case eithe...
[ { "msg_contents": "I found in a production system that mostly the performance is being \ncrippled by the handling of one particular case.\n\nI hope I've reduced this to a minimal example, below.\n\nSummary: when more than one key is given (or the data is sourced from a \ntable) the planner is forced to a join o...
[ { "msg_contents": "Le dimanche 26 février 2012 01:16:08, Stefan Keller a écrit :\n> Hi,\n> \n> 2011/10/24 Stephen Frost <sfrost@snowman.net> wrote\n> \n> > Now, we've also been discussing ways to have PG automatically\n> > re-populate shared buffers and possibly OS cache based on what was in\n> > memory at the ...
[ { "msg_contents": "I happened to be looking in the PostgreSQL logs (8.4.10, x86_64,\nScientificLinux 6.1) and noticed that an app was doing some sorting\n(group by, order by, index creation) that ended up on disk rather than\nstaying in memory.\nSo I enabled trace_sort and restarted the app.\nWhat followed conf...