threads
listlengths
1
275
[ { "msg_contents": "Summary: Non-unique btree indices are returning CTIDs for rows with same\nvalue of indexed column not in logical order, imposing a high performance\npenalty.\n\nRunning PG 9.5.3 now, we have a time-based partitions of append-only tables\nwith data loaded from other sources. The tables are pa...
[ { "msg_contents": "Hi all.\n\nWe have found that queries through PgBouncer 1.7.2 (with transaction pooling) to local PostgreSQL are almost two times slower in 9.5.3 than in 9.4.8 on RHEL 6 hosts (all packages are updated to last versions). Meanwhile the problem can’t be reproduced i.e. on Ubuntu 14.04 (also ful...
[ { "msg_contents": "We are starting some testing in AWS, with EC2, EBS backed setups.\n\nWhat I found interesting today, was a single EBS 1TB volume, gave me\nsomething like 108MB/s throughput, however a RAID10 (4 250GB EBS\nvolumes), gave me something like 31MB/s (test after test after test).\n\nI'm wondering w...
[ { "msg_contents": "Hello!\n\nI am just about to upgrade from PostgreSQL 8.4.20 to 9.2.15, but I'v run\ninto some huge performance issues. Both databases are configured the\nsame way (shared_buffers = 2GB, temp_buffers = 32MB). I have increased\nwork_mem on the 9.2 from 4MB to 64MB, but to no avail.\n\nNow, the ...
[ { "msg_contents": "I am trying to insert rows that don't already exist from a temp table into\nanother table. I am using a LEFT JOIN on all the columns and checking for\nnulls in the base table to know which rows to insert. The problem is that\nthe planner is choosing a nested loop plan which is very slow over ...
[ { "msg_contents": "Hello,\nI'm trying to find persons in an address database where I have built \ntrgm-indexes on name, street, zip and city.\n\nWhen I search for all four parts of the address (name, street, zip and city)\n\n select name, street, zip, city\n from addresses\n where name % $1\n ...
[ { "msg_contents": "Hi All\n Can anyone please point me to location from where i can get slony\nslony1-95-2.2.2-1.rhel5.x86_64\n<http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/slony1-95-2.2.4-4.rhel5.x86_64.rpm>\n rpm. I'm upgrading database from version 9.3 to 9.5. Current version of\nrpm we are us...
[ { "msg_contents": "SELECT pg_database_size('DB1') takes 60ms for 7948 kB size DB. Is there any\nway to reduce the time taken or any other ways to find data base size?\n\nThanks and Regards,\nS.Sangeetha\n\n\n\n--\nView this message in context: http://postgresql.nabble.com/pg-database-size-tp5906449.html\nSent ...
[ { "msg_contents": "Hello,\n\nI have two tables phone_number and phone_number_type\n\nWhen I start transaction and insert phone_number using FK from \nphone_number_type. Then I can during another TX update row from \nphone_number_type, but I can't execute select for update on it.\n\nIn db stats I see during inse...
[ { "msg_contents": "Hello,\n\nI run a query transforming huge tables to a json document based on a period.\nIt works great for a modest period (little dataset).\nHowever, when increasing the period (huge dataset) I get this error:\n\nSQL ERROR[54000]\nERROR: array size exceeds the maximum allowed (1073741823)\n\...
[ { "msg_contents": "Hi.\n\nI had a fight with a query planner because it doesn’t listen.\n\nThere are two indexes:\n\n - with expression in descending order:\n \"offers_offer_next_update_idx\" btree (offer_next_update(update_ts, update_freq) DESC) WHERE o_archived = false\n - unique with two columns:\n \"o...
[ { "msg_contents": "Hello,\nFirst time poster here. Bear with me.\nUsing PostgreSQL 9.5\nI have a situation where I have a LIKE and a NOT LIKE in the same query to\nidentify strings in a varchar field. Since I am using wildcards, I have\ncreated a GIN index on the field in question, which makes LIKE '%xxxx%'\n...
[ { "msg_contents": "In our Django app we have messages (currently about 7 million in table\nmsgs_message) and labels (about 300), and a join table to associate\nmessages with labels (about 500,000 in msgs_message_labels). Not sure\nyou'll need them, but here are the relevant table schemas:\n\nCREATE TABLE msgs_m...
[ { "msg_contents": "Hi,\n\nI have an application which stores a large amounts of hex-encoded hash\nstrings (nearly 100 GB of them), which means:\n\n - The number of distinct characters (alphabet) is limited to 16\n - Each string is of the same length, 64 characters\n - The strings are essentially random\n\...
[ { "msg_contents": "This is my first post to the mailing list, so I apologize for any etiquette\nissues.\n\nI have a few databases that I am trying to move from one system to\nanother. Both systems are running Windows 7 and Postgres 8.4, and they are\npretty powerful machines (40-core Xeon workstations with dec...
[ { "msg_contents": "Hello,\n \nI've a basic table with about 100K rows:\n \n\n\nCREATE TABLE \"public\".\"push_topic\" (\n \"id\" Serial PRIMARY KEY,\n \"guid\" public.push_guid NOT NULL,\n \"authenticatorsending\" Varchar(32) NOT NULL,\n \"authenticatorsubscription\" Varchar(32) NOT NULL,\n \"countpushed\" Inte...
[ { "msg_contents": "Hey all, testing out 9.6 beta 1 right now on Debian 8.5.\n\nI have a query that is much slower on 9.6 than 9.5.3.\n\nAs a side note, when I explain analyze instead of just executing the query\nit takes more than 2x as long to run. I have tried looking for info on that\nonline but have not fou...
[ { "msg_contents": "Hi ,\n\nI am connecting to PostgreSQL 9.4 via an ODBC driver on Windows machine from MS VBA application. I am facing huge performance issues while inserting data continuously. On analysing the logs , there were around 90000 statements related to Save Points and Release Points.\n\nduration: 2....
[ { "msg_contents": "Hey guys!\n\nWe are looking for active beta participants to try out our new SaaS-BaseD\nMonitoring Tool. Our tool will monitor your databases and their underlying\n(virtual) infrastructure. If you would like to be a part of the beta, sign\nup here: http://www.bluemedora.com/early-access/\n\nW...
[ { "msg_contents": "I'm working with a third-party plugin that does chemistry. It's very fast.\nHowever, I'm trying to do a sampling query, such as the first 1% of the\ndatabase, and I just can't get the planner to create a good plan. Here is\nthe full query (the |>| operator does a subgraph match of a molecula...
[ { "msg_contents": "Hi,\nI've postgres 9.5.3 installed on win7 64 bit, and ubuntu 16.04tls 64 \nbit, same SSD (evo 850 pro) , two different partitions. Laptop is 3.8Ghz.\nI've in each partition a simple database with one table called data256 \nwith one column of 256 char.\nI wrote a program using libpq which:\n...
[ { "msg_contents": "Hello Guys,\n\nI found very strange behavior on one of the master-slave clusters.\n\nIn case i'm running query several times in the same session i'm getting performance increase on the second request and huge performance decrease starting from 6 request. Behavior in 100% situations repeatable...
[ { "msg_contents": "testing\n\n\n\n-- \nSent via pgsql-performance mailing list (pgsql-performance@postgresql.org)\nTo make changes to your subscription:\nhttp://www.postgresql.org/mailpref/pgsql-performance\n", "msg_date": "Tue, 28 Jun 2016 10:10:07 -0400", "msg_from": "George Neuner <gneuner2@comcast.n...
[ { "msg_contents": "Hi,\n\nI have a weird slow query issue I can't seem to find the cause of, so I'm\nhoping someone here can shed some light on this.\n\nContext:\nI have an application which (among other things) implements a sort of job\nqueue using postgres for persistence. While I know a RDBMS is not necessar...
[ { "msg_contents": "About a day ago, there seems to have been some trouble in the network of my database (postgresql 9.3). \n\nI’m running my db with a streaming replication setup with wall shipping. \n\nI sync wal logs to a mounted networkdrive using archive_command = 'rsync -a %p /mnt/wal_drive/wals/%f </dev/n...
[ { "msg_contents": "Hi.\n\nI'm trying to build an OLAP-oriented DB based on PostgresSQL.\n\nUser works with a paginated report in the web-browser. Interface allows \nto fetch data for a custom date-range selection,\ndisplay individual rows (20-50 per page) and totals (for entire \nselection, even not visible on ...
[ { "msg_contents": "I tried to DELETE about 7 million rows at once, and the query went up to\n15% of the RAM (120 GB in total), which pushed some indexes out and the\nserver load went up to 250, so I had to kill the query.\n\nThe involved table does not have neither foreign keys referring to other\ntables, nor o...
[ { "msg_contents": "Hi,\n\nI was wondering whether there are any plans to include the plan of the\nFK check in EXPLAIN output. Or is there a different way to get to see\nall the plans of triggers as well as of the main SQL?\n\nWhen researching I found this thread from 2011 and the output format\ndoes not seem to...
[ { "msg_contents": "Hello,\n\nI've been reading Mr. Greg Smith's \"Postgres 9.0 - High Performance\" book\nand I have some questions regarding the guidelines I found in the book,\nbecause I suspect some of them can't be followed blindly to the letter on a\nserver with lots of RAM and SSDs.\n\nHere are my server ...
[ { "msg_contents": "Hi, \nWe had a similar situation and the best performance was with 64MB background_bytes and 512 MB dirty_bytes.\nTigran.\n\nOn Jul 5, 2016 16:51, Kaixi Luo <kaixiluo@gmail.com> wrote:Hello,I've been reading Mr. Greg Smith's \"Postgres 9.0 - High Performance\" book and I have some questions r...
[ { "msg_contents": "Why all this concern about how long a disk (or SSD) drive can stay up\nafter a power failure?\n\nIt seems to me that anyone interested in maintaining an important\ndatabase would have suitable backup power on their entire systems,\nincluding the disk drives, so they could coast over any power...
[ { "msg_contents": "I've found that pgtune doesn't quite provide the benefit that I would\nlike. It still uses large work mem and maintenance work mem numbers,\neven though, up until now Postgres has an issue with large numbers of\ntuples, so seems that smaller settings are better, in the 64MB type\nrange. (base...
[ { "msg_contents": ">I don't really see anything suspicious in the profile. This looks more\n>like a kernel scheduler issue than a postgres bottleneck one. It seems\n>that somehow using nonblocking IO (started in 9.5) causes scheduling\n>issues when pgbouncer is also local.\n>\n>Could you do perf stat -ddd -a sl...
[ { "msg_contents": "Came across this from a client today. Was able to work around it with a \nfence, but wanted to report it for the next time Robert generates \nstatistics on planner problems. ;) It appears the problem is the planner \ncouldn't recognize that even though there's ~400k rows for user 3737558, \nv...
[ { "msg_contents": "I'm working on Postgresql 9.5.3 and executed a query which takes 5 or 7 seconds and it should not take more than 0.30 milliseconds, the query is:\n\n\n-----------QUERY--------------------------------------------------------------------------------------\n\n\nwith recursive t(level,parent_id,i...
[ { "msg_contents": "Hi all\nI'm having a problem with a slow query - I tried several things to optimize the queries but didn't really help. The output of explain analyse shows sequential scan on a table of 25 million rows. Even though it is indexed and (I put a multi-column index on the fields used in the query)...
[ { "msg_contents": "Hi.\n\nI have an OLAP-oriented DB (light occasional bulk writes and heavy \naggregated selects over large periods of data) based on Postgres 9.5.3.\n\nServer is a FreeBSD 10.3 with 64GB of RAM and 2x500GB SSD (root on ZFS, \nmirror).\n\nThe largest table is 13GB (with a 4GB index on it), othe...
[ { "msg_contents": "I have this schema:\n \nCREATE TABLE onp_crm_person( id serial PRIMARY KEY, onp_user_id bigint \nreferencesonp_user(id) deferrable initially deferred, is_resource boolean not \nnull default false, UNIQUE(onp_user_id) ); CREATE TABLE onp_crm_activity_log( id\nbigserial PRIMARY KEY, relation_id...
[ { "msg_contents": "Sir/Madam,Plateform: RHEL6.5,  Postgresql9.4.0.\ncreate extension plperl;\nCreate language plperl;\nI have done following settings:\nPerl version 5.10vi /etc/ld.so.conf.d/libperl.conf/usr/lib/5.10/multi-thread/i386.../CORE/libperl.soldconfig\nERROR: Can not load \"/opt/Postgresql/9.4/lib/post...
[ { "msg_contents": "Hey guys!\n\nWe are looking for active beta participants to try out our new SaaS-Based\nDatabase Monitoring Tool. Our tool will monitor your databases and their\nunderlying (virtual) infrastructure. If you would like to be a part of the\nbeta, sign up here: http://www.bluemedora.com/early-acc...
[ { "msg_contents": "Hi,\r\n\r\nI’ve got a SQL runs for about 4 seconds first time it’s been executed,but very fast (20ms) for the consequent runs. I thought it’s because that the first time table being loaded into memory. However, if you change the where clause value from “cat” to “dog”, it runs about 4 seconds ...
[ { "msg_contents": "Hello,\n\nIs it possible to log queries using sequential scans? Or possibly every\nquery in a way which allows grepping for those with sequential scans?\n\nHello,Is it possible to log queries using sequential scans? Or possibly every query in a way which allows grepping for those with sequent...
[ { "msg_contents": "I have a table (registry.entry) which has ~ 100 inherited tables. This\nis a master table and it's empty:\n\npostgres@db=# select count(*) from only registry.entry;\n count\n-------\n 0\n(1 row)\n\nMaster table has rules, inherited tables has check constraints. Data\npartitioned by value ...
[ { "msg_contents": "Hi,\nthe problem I'm dealing with is long holding locks during extensions of\ntable: \nprocess xxx still waiting for ExclusiveLock on extension of relation xxx of \ndatabase xxx after 3000.158 ms\nMy application is write intensive, in one round I need to insert about 1M\nrows. The general sch...
[ { "msg_contents": "Greetings.\n\nI have a question on why planner chooses `IndexScan` for the following\nquery:\n\n SELECT la.loan_id, la.due_date, la.is_current\n FROM loan_agreements la WHERE la.is_current AND '2016-08-11' >\nla.due_date;\n\nRelevant (cannot post it all, sorry) table definition is:\n\...
[ { "msg_contents": "On 2016-08-20 08:21, pgsql-performance-owner@postgresql.org wrote:\n> Welcome to the pgsql-performance mailing list!\n> Your password at PostgreSQL Mailing Lists is\n> \n> x8DiA6\n> \n> To leave this mailing list, send the following command in the body\n> of a message to majordomo@postgresql....
[ { "msg_contents": "Dear Sir/Mam,\n\nI have a PostgreSQL 9.5 instance running on Windows 8 machine with 4GB \nof RAM.This server is mainly used for inserting/updating large amounts \nof data via copy/insert/update commands, and seldom for running select \nqueries.\n\nHere are the relevant configuration parameter...
[ { "msg_contents": "Hello,\n\nI have the following tables and query. I would like to get some help to\nfind out why it is slow and how its performance could be improved.\n\nThanks,\nTommi K.\n\n\n*--Table definitions---*\nCREATE TABLE \"Measurement\"\n(\n id bigserial NOT NULL,\n product_id bigserial NOT NULL,...
[ { "msg_contents": "Hello,\nthanks for the response. I did not get the response to my email even though\nI am subscribed to the pgsql-performance mail list. Let's hope that I get\nthe next one :)\n\nIncreasing work_mem did not have great impact on the performance. But I\nwill try to update the PostgreSQL version...
[ { "msg_contents": "Is it possible to find the number of disk IOs performed for a query? EXPLAIN ANALYZE looks like it shows number of sequential rows scanned, but not number of IOs. \n\nMy database is on an NVMe SSD, and am trying to cut microseconds of disk IO per query by possibly denormalizing.\n\nThank yo...
[ { "msg_contents": "High level summary: server ram has a significant impact on batch processing\nperformance (no surprise), and AWS processing can largely compete with local\nservers IF the AWS network connection is optimized.\n\nWith the recent threads about insert performance (and performance in\ngeneral), I ...
[ { "msg_contents": "\n\nHi *,\n\njust installed official rpm from http://yum.postgresql.org/ to check\nfunctionality and performance of 9.6rc1. Unfortunately, binaries are\ncompiled with debug_assertions=on, which makes any performance testing\nuseless.\n\nRegards,\n Tigran.\n\n\n-- \nSent via pgsql-performanc...
[ { "msg_contents": "Hello,\n\n\nMy Application has normally 25 to 30 connections and it is doing lot of\ninsert/update/delete operation.\nThe database size is 100GB.\niowait is at 40% to 45 % and CPU idle time is at 45% to 50%\nTOTAL RAM = 8 GB TOTAL CPU = 4\n\npostgresql.conf parametre:\n\nshared_buffers = 2...
[ { "msg_contents": "Hi all,\nOne of my customer has reported to me a performance problem when using \nthe E-Maj extension.\nIt is a tool that allows to log updates performed on application tables, \nwith the capability to cancel them.\nIt is based on classic triggers with a log table associated to each \napplica...
[ { "msg_contents": "I’m running PostgreSQL 9.5.4 on a virtual machine for production purposes. It runs Ubuntu 16.04.1 LTS 64bit, 32GB RAM, 461GB disk space and 4 x logical CPUs.\n\nPostgres executes the following activities:\n- many INSERTS for ETL\n- a lot of read and write operations for the main OLTP applicat...
[ { "msg_contents": "Hi,\n\nI have a problem with the performance of some queries using unnest after migrating from V9.1.12 to V9.5.3. It doesn't depend on if I am using pg_upgrade or pg_dumpall for migration.\nI tried different versions of PostgreSQL. The problem starts with V9.2.\nThe databases V9.1.12 and V9.5...
[ { "msg_contents": "Hello,\n\ni would please like to have some suggestions to optimize Postgres 8.4 for a very heavy number of select (with join) queries.\nThe queries read data, very rarely they write.\n\nThank you!\nFrancesco\n\n-- \nSent via pgsql-performance mailing list (pgsql-performance@postgresql.org)\nT...
[ { "msg_contents": "Hello, I am curious about the performance of queries against a master table\nthat seem to do seq scans on each child table. When the same query is\nissued at a partition directly it uses the partition index and is very\nfast.\n\nThe partition constraint is in the query criteria. We have non...
[ { "msg_contents": "Hi pgsql-performance list,\n\n\nwhat is the recommended way of doing **multiple-table-spanning joins \nwith ORs in the WHERE-clause**?\n\n\nUntil now, we've used the LEFT OUTER JOIN to filter big_table like so:\n\n\nSELECT DISTINCT <fields of big_table>\nFROM\n \"big_table\"\n LEFT OU...
[ { "msg_contents": "I’m storing thousands of independent documents each containing around 20k\nrows. The larger the document, the more likely it is to be active with\ninserts and updates (1000s/day). The most common read query is to get all\nthe rows for a single document (100s/day). It will be supporting real-t...
[ { "msg_contents": "Thank you Mike & Jim for your responses.\n\n> Are there other issues/requirements that are creating other performance\nconcerns\n> that aren’t obvious in your initial post\n\nYes, there are a few things:\n\n*1. Full document queries really are necessary*\n\n> it’s too much data to show on a w...
[ { "msg_contents": "Hey all,\n\nObviously everyone who's been in PostgreSQL or almost any RDBMS for a time\nhas said not to have millions of tables. I too have long believed it until\nrecently.\n\nAWS d2.8xlarge instance with 9.5 is my test rig using XFS on EBS (io1) for\nPGDATA. Over the weekend, I created 8M...
[ { "msg_contents": "test:\r\ncreate type h3 as (id int,name char(10));\r\n\r\nCREATE or replace FUNCTION proc17() \r\nRETURNS SETOF h3 AS $$ \r\nDECLARE\r\nv_rec h3;\r\nBEGIN \r\n create temp table abc(id int,name varchar) on commit drop;\r\ninsert into abc select 1,'lw';\r\ninsert into abc select 2,'lw2';\...
[ { "msg_contents": "I've got a query that takes a surprisingly long time to run, and I'm having\na really rough time trying to figure it out.\n\nBefore I get started, here are the specifics of the situation:\n\nHere is the table that I'm working with (apologies for spammy indices, I've\nbeen throwing shit at the...
[ { "msg_contents": "Hi!\n\nWe are having a baffling problem we hope you might be able to help with. We were hoping to speed up postgres restores to our reporting server. First, we were seeing missing indexes with pg_restore to our reporting server for one of our databases when we did pg_restore with multiple job...
[ { "msg_contents": "Hi,\r\nI am relatively new to MYSQL and not really sure I am in the right forum for this.\r\n\r\nI have a situation which I am not understanding. I am performing a simple query :\r\n\r\nSelect * from tableA\r\nWhere date >= ‘2016’06-01’\r\nAnd date < ‘2016-07-01’\r\n\r\nIndex is on date\r\nQ...
[ { "msg_contents": "Hi,\n\nI have a table of around 20 G, more than 220 million records, and I'm\nrunning this query on it:\n\nexplain analyze SELECT MAX(id) - (SELECT id FROM expl_transactions WHERE\ndateAdded < (now() - INTERVAL '10 MINUTES') ORDER BY dateAdded DESC LIMIT\n1) FROM expl_transactions;\n\n\"id\" ...
[ { "msg_contents": "\n\n\n\n\n Hi,\n Today, I noticed strange situation:\n\n The same query run on different servers has very different plan:\n\n Q: SELECT b.* FROM kredytob b  WHERE pesel = '22222222222'  ORDER BY\n b.id DESC LIMIT 1 \n\n Slow plan:\n\n \"Limit  (cost=0.43..28712.33 rows=1 ...
[ { "msg_contents": "Team,\n\nwe are seeing delay in converting logs from ready state to done state in\npg_xlog archive status.\n\nwe have seen pg_xlog generated 2000 per hour and it is getting archived\n1894. So the speed at which the archiving is done is too slow as compare to\nthe pg_xlog generation\n\nSo our ...
[ { "msg_contents": "Hello,\n\n\n\nWe are using postgresql 9.2 on redhat linux instance over openstack cloud.\n\n\n\nDatabase is around 441 GB.\n\n\n\nWe are using below command to take backup:\n\n\n\npg_basebackup -v -D /pgbackup/$bkupdir -Ft -z -c fast\n\n\n\nBackup size created is around 84GB.\n\n\n\nHowever, ...
[ { "msg_contents": "The depesz link for explain (analyze, buffers) is shown below for 3\ndifferent queries. The first two queries show a log dump of the postgres\nlog, showing a query that was generated by Java Hibernate. The third query\nwas one I wrote and ran in pgadmin that I think is similar to what\nHibern...
[ { "msg_contents": "How fast is Postgres's string concatenation in comparison to the various Python string concatenation? I'm using PREPARE statements for my SELECT queries for my web server.\n\nI'm wondering if I should just generate my JSON API (or even HTML) strings in Postgres directly, instead of in Python...
[ { "msg_contents": "Hello:\n\nI've a question about the performance of a query plan that uses a nested\nloop, and whose inner loop uses an index scan. Would you be so kind to\nhelp me, please?\n\nI'm using PostgreSQL 9.5.4 on Ubuntu 14.04 64-bit (kernel 4.8.2). I've 3\ntables, which are \"answers\", \"test_compl...
[ { "msg_contents": "Hi\n\n\nI have two main problems and that is slow updates and joins, but when I build up the table met_vaer_wisline.nora_bc25_observation with more than 4 billion we are able to insert about 85.000 rows pr sekund so thats ok.\n\n\nThe problems start when I need to update or joins with other t...
[ { "msg_contents": "Hi.\n\nQuery run time degraded after migration from Pg 9.0 + postgis 1.5 to Pg 9.4\n+ postgis 2.2.\n\n1 ms versus 7 ms.\n\nSame query, same data, same schema, similar hardware. Data is small and\nfits in cache.\n\nEXPLAIN shows heap scan cost increase. What can be the reason for 40-fold\nincr...
[ { "msg_contents": "This is a weird problem. A \"limit 5\" query runs quicky as expected, but a\n\"limit 1\" query never finishes -- it just blasts along at 100% CPU until I\ngive up. And this is a join between two small tables (262K rows and 109K\nrows). Both tables were recently analyzed.\n\nThis is Postgres 9...
[ { "msg_contents": "I've recently been blessed to move one of my databases onto a huge IBM P8 computer. Its a power PC architecture with 20 8-way cores (so postgres SHOULD believe there are 160 cores available) and 1 TB of RAM.\n\nI've always done my postgres tuning with a copy of \"pgtune\" which says in the ...
[ { "msg_contents": "My PG 9.4.5 server runs on Amazon RDS some times of the day we have a lot of checkpoints really close (less than 1 minute apart, see logs below) and we are trying to tune the DB to minimize the impact of the checkpoint or reduce the number of checkpoints.\r\n\r\nServer Stats\r\n· Inst...
[ { "msg_contents": "Hello! \nWe have a situation when after creation of new materialized view cpu utilization falls down (from about 50% to about 30%), at the same time we have a cron job, which does refresh of old materialized view, but it does no effect at performance.\nCan anyone explain why is it so? And wha...
[ { "msg_contents": "Hi everyone,\n\nI'm facing a peformance decrease after switching to a more performant VPS :\nhttp://serverfault.com/questions/812702/posgres-perf-decreased-although-server-is-better\n\nMy questions are:\n\n 1. What benchmark should I perform before switching to a new server?\n 2. What's y...
[ { "msg_contents": "We have a report query which joins (multiple times, actually) against this\ntrivial, tiny table:\n\nts=# \\d bsm_to_switch\nTable \"public.bsm_to_switch\"\n Column | Type | Modifiers \n--------+------+-----------\n bsm | text | not null\n switch | text | not null\n\nts=# SELECT length(bsm)...
[ { "msg_contents": "Hi friends,\n\nI am running 2 Linux machines, kernel 3.13.0-45-generic #74-Ubuntu SMP.\nPostgresql version 9.4 in both machine, in a Hot Standby cenario.\n\nMaster-Slave using WAL files, not streaming replication.\n\nThe archive_command from master is:\n\narchive_command = '/usr/bin/rsync -a...
[ { "msg_contents": "So I have a data warehouse type of postgresql server. Each day a new db is\ncreated and new data is inserted into the new db (around 20G). The data is\nfairly simple in structure, around 100 tables and some of the table is\npretty big with millions of rows. Each table has only a primary key, ...
[ { "msg_contents": "Hello all, I have a query that was running quickly enough on 9.5.5 and has\nslowed to a halt after upgrading to 9.6.1.\n\nThe server hardware is the same, 2 core, 4GB ram DigitalOcean virtual\nserver, running Debian 8.6.\n\nThe query is a pretty heavy reporting query to aggregate the dollar v...
[ { "msg_contents": "Hi,\n\nI try to tune one Recursive CTE.\n\nExplain Plan can be found here\nhttps://explain.depesz.com/s/yLVd\n\nAnyone can give me direction to check?\n\n//H.\n\n\n\n\n\n\n\nHi,\n\nI try to tune one Recursive CTE.\n\nExplain Plan can be found here\nhttps://explain.depesz.com/s/yLVd\n\nAnyone ...
[ { "msg_contents": "Hello,\n\nI am trying to implement an efficient \"like\" over a text[]. I see a lot of people have tried before me and I learnt a lot through the forums. The results of my search is that a query like the following is optimal:\n\nselect count(*)\n from claims\nwhere (select count(*)\n ...
[ { "msg_contents": "Hi,\n\nI have a select moving around a lot of data and takes times\nAny advice tuning this query ?\n\nEXPLAIN (ANALYZE ON, BUFFERS ON)\n    select\n    d.books,\n    d.date publish_date,\n    extract(dow from d.date) publish_dow,\n    week_num_fixed,\n    coalesce(sum(case when i.invno is not...
[ { "msg_contents": "Dear list,\nI’m looking for some guidelines on how to optimize the configuration of a production database dedicated to a DWH application.\nI run the application on different machines and have solved several issues since now but am struggling on a production environment running Red Hat 6.7 and...
[ { "msg_contents": "Hi,\n\nOn our production environment (PostgreSQL 9.4.5 on\nx86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat\n4.8.5-4), 64-bit), one of our queries runs very slow, about 5 minutes . We\nnoticed that it does not use an index that we anticapited it would.\n\nThe query is\n...
[ { "msg_contents": "I have the a table with two indexes...\n\nCREATE TABLE mobile_summary_usage\n(\n import text,\n msisdn text,\n type text,\n total integer,\n day date,\n cycle text\n);\n\nCREATE INDEX mobile_summary_usage_msisdn_cycle ON mobile_summary_usage\nUSING btree (msisdn...
[ { "msg_contents": "Hi,\n\nI have some data to join and I want to get som advice from you.\n\nAny tips ? Any comments are apreciated\n\n//H\n\nselect trade_no\nfrom\nforecast_trades.hist_account_balance\nleft join trades using (trade_no)\nwhere  trade_date > current_date - 120\n   and    trade_date < current_dat...
[ { "msg_contents": "Hello!\nWe have a server with 8.4.1 that we want to migrate to 9.6.1\nBefore doing anything, we ran pgbench serveral times.\nThe results were always similar to the following:\n\n$ pgbench -l -c 100 -T 30 pgbench\nstarting vacuum...end.\ntransaction type: TPC-B (sort of)\nscaling factor: 1\nqu...
[ { "msg_contents": "Hi,\n\nI run one query and the execution is very different\n\nSelect messages\n from mails_hist\n join mails using (messages)\n where message_date > '2016-07-19 00:00:00'\n and message_date < '2016-10-17 00:00:00'\n Group by message;\n\nmessage_date is one timestamp\n\nQuery...
[ { "msg_contents": "Hi,\n\nI run this query select count(*) from analyse_forecast where\ndaterange_analyse <@ daterange( current_date - 150, current_date, '[]') ;\n\nSometimes will query be quick and sometimes is same query SUPER SLOWWWW\n\nSomething I can do ? Something I can check for ?\n\n//Bill\n\nHi,I run ...
[ { "msg_contents": "If I construct the materialized view with an 'order by', I can use a BRIN\nindex to a sometimes significant performance advantage, at least for the\nprimary sort field. I have observed that even though the first pass is a\nlittle lossy and I get index rechecks, it is still much faster than a...
[ { "msg_contents": "Hi,\n\nDo I miss something?\nShouldn't I have some rows from this query ?\n\nWhy is it empty?\n\n\n\nSELECT relname, idx_tup_fetch + seq_tup_read as TotalReads from\npg_stat_all_tables\n WHERE idx_tup_fetch + seq_tup_read != 0\n order by TotalReads desc\n LIMIT 10;\n relname | totalreads\n---...
[ { "msg_contents": "I am trying to configure Postgres (version 9.5) to take advantage of very\nlarge memory environment. Server configuration has 256GB RAM, 12 cores and\n2 SSDs on RAID0 and runs Ubuntu. Swap is set at 4GB.\n\nThe machine is used for data warehouse operations. Typically only 1\nstatement runs at...
[ { "msg_contents": "Hello,\n\nThere's a slow UPDATE query in my logs (~60s). However, when I run it\nmanually, it's really fast ( < 0.5ms).\n\n2016-11-23 18:13:51.962 GMT [742-25]: bpd_production bpd@web001(40916)\n00000 Passenger RubyApp: /var/www/bpd/current (production) LOG: duration:\n59876.947 ms statemen...
[ { "msg_contents": "Hello all,\r\n I can monitor a table use triger write in language C as the example in postgres document .But I don't know whether or not can a trigger monitor more than one table?Is there a example?\r\nThanks,\r\nzhangkai\r\n\r\n2016-11-28\r\n\r\n\r\n\r\nzhangkai\n\n\n\n\n\n\n\nHello all,...
[ { "msg_contents": "Hi,\n\ni have a performance issue with bitmap index scans on huge amounts of big jsonb documents.\n\n\n===== Background ===== \n\n- table with big jsonb documents\n- gin index on these documents\n- queries using index conditions with low selectivity\n\n\n===== Example ===== \n\nselect version...