Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:34 PM, "Tom Lane" wrote: > > Arthur Silva writes: > > We recently started looking into a long standing ticket to change some > > foreign keys referential actions from CASCADE to RESTRICT for our own > > safety. Everything else in the FK stays

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:29 PM, "Adrian Klaver" wrote: > > On 11/07/2016 02:09 AM, Arthur Silva wrote: >> >> Hi all, we're running a few Pg databases in production. >> >> Ubuntu 14.04 x64 >> 32 x64 cores >> 64GB to 256GB memory, depending o

[GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
quickly and/or without an exclusive lock? Is it safe(ish) to just update pg_constraint.confupdtype and pg_constraint.confdeltype for those? Regards -- Arthur Silva

Re: [GENERAL] jsonb search

2016-06-28 Thread Arthur Silva
; > If so what indexing strategy can be used to have similar gains as above ? > > > > > > Many thanks for any help > > Vodka is our experimental prototype of access method of next > generation and it doesn't exists in production-ready form. You can > check our presentation > http://www.sai.msu.su/~megera/postgres/talks/highload-2014-vodka.pdf > to understand jsquery limitation and why we stop its development. > Also, 2 years ago I wrote (in russian) > http://obartunov.livejournal.com/179422.html about jsonb query > language and our plans. Google translate might helps > > > https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fobartunov.livejournal.com%2F179422.html&edit-text=&act=url > > > > > > > > Armand > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > Could you share your future plans for it (or it's reincarnation), if any? Even in the limited form, vodka is very impressive. -- Arthur Silva

Re: [GENERAL] Postgresql-fdw

2016-05-22 Thread Arthur Silva
You can build a multicorn fdw http://multicorn.org/ Regards On May 23, 2016 7:54 AM, "aluka raju" wrote: > > I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. I want to pr

Re: [GENERAL] Share my experience and Thank you !

2016-05-13 Thread Arthur Silva
Any specific reason for choosing this old version of postgres? On May 13, 2016 8:46 AM, "JingYuan Chen" wrote: > Hello, > > I want to share my experience about one of my projects and say thank you > to the community. > > Scenario : > My company's ERP system is SAP and rent a procurement system fo

Re: [GENERAL] arrays, inline to pointer

2016-05-03 Thread Arthur Silva
In fact, disabling toast compression will probably improve the performance (the indirection will still take place). A float array is not usually very compressible anyway. On May 3, 2016 10:37 AM, "John R Pierce" wrote: > On 5/3/2016 1:21 AM, Marcus Engene wrote: > > For each array I've added, and

Re: [GENERAL] JSONB performance enhancement for 9.6

2015-11-29 Thread Arthur Silva
Is this correct? I'm fairly sure jsonb supports lazily parsing objects and each object level is actually searched using binary search. Em 29/11/2015 11:25 AM, "Tom Smith" escreveu: > Hi, Thanks for everyone's response. > > The issue is not just compression, but lack of "indexing" or > "segmentati

Re: [GENERAL] How to speed up pg_trgm / gin index scan

2015-07-28 Thread Arthur Silva
ime=19031.983..19031.983 rows=0 loops=1) > -> Bitmap Index Scan on tridx_logs_01_msg > (cost=0.00..508.15 rows=8020 width=0) (actual time=18408.121..18408.121 > rows=99 loops=1) >Index Cond: (msg ~~ '%192.23.33.177%'::text) > -> Bitmap Index Scan on logs_01_date_index > (cost=0.00..27789.60 rows=1325303 width=0) (actual time=623.084..623.084 > rows=1173048 loops=1) >Index Cond: ((log_date >= '2015-01-18 > 01:45:24'::timestamp without time zone) AND (log_date <= '2015-01-19 > 01:45:24'::timestamp without time zone)) > Planning time: 0.945 ms > Execution time: 19032.409 ms > (13 rows) > > Great stuff! Sorry Oleg I don't have your original message anymore and > can't reply into the right place in the thread, so I took the liberty to > CC: you. > > Christian > > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > Christian You could experiment recompiling pg_trgm commenting out the KEEPONLYALNUM and/or IGNORECASE definitions if you are looking for exact matches, this will increase the index size but will make it more selective. Also, there's a thread around for pg_trgrm 1.2 which will get you even more boost. -- Arthur Silva

Re: [GENERAL] Which replication is the best for our case ?

2015-07-01 Thread Arthur Silva
On Wed, Jul 1, 2015 at 7:08 AM, ben.play wrote: > In fact, the cron job will : > -> select about 10 000 lines from a big table (>100 Gb of data). 1 user has > about 10 lines. > -> each line will be examinate by an algorithm > -> at the end of each line, the cron job updates a few parameters for t

Re: [GENERAL] Which replication is the best for our case ?

2015-06-30 Thread Arthur Silva
On Tue, Jun 30, 2015 at 1:57 PM, ben.play wrote: > Hi guys, > > Thank you a lot for your answers. > > In fact, I tried to write the easiest explanation of my problem in order to > be understood... > My project is developed with Symfony and Doctrine (BERK, i know ...). > > The project has more tha

Re: [GENERAL] Which replication is the best for our case ?

2015-06-29 Thread Arthur Silva
On Mon, Jun 29, 2015 at 1:44 PM, Adrian Klaver wrote: > On 06/29/2015 08:23 AM, Arthur Silva wrote: > >> On Mon, Jun 29, 2015 at 10:02 AM, ben.play > <mailto:benjamin.co...@playrion.com>> wrote: >> >> Hi guys, >> >> We have a PG databa

Re: [GENERAL] Which replication is the best for our case ?

2015-06-29 Thread Arthur Silva
On Mon, Jun 29, 2015 at 10:02 AM, ben.play wrote: > Hi guys, > > We have a PG database with more than 400 GB of data. > At this moment, a cron runs each ten minutes and updates about 10 000 lines > with complex algorithms in PHP. > > Each time the cron runs, the website is almost down because som

Re: [GENERAL] advocating LTS release and feature-train release cycles

2015-06-01 Thread Arthur Silva
On Sun, May 31, 2015 at 6:44 AM, Zenaan Harkness wrote: > My comments advocating a (ubuntu/debian/linux-kernel/firefox) LTS > release and feature-train release cycle: > https://lwn.net/Articles/646740/ > https://lwn.net/Articles/646743/ > > The parent article "PostgreSQL: the good, the bad, and t

Re: R: [GENERAL] Index on integer or on string field

2015-05-15 Thread Arthur Silva
niqueness". > > If in this 10.millions long table i have, in index, 50 recurring values, i > can leave the alphabetical field and change to btree-gin the index on it?! > > Thank you! > Francesco > > -- > *Da:* Arthur Silva [arthur...@gmail.co

Re: [GENERAL] Index on integer or on string field

2015-05-15 Thread Arthur Silva
You should probably experiment with a btree-gin index on those. Em 15/05/2015 12:22, "Job" escreveu: > Hello, > > i have a table of about 10 millions of records, with the index on a string > field. > Actually is alphabetical; since queries are about 100/200 per seconds, i > was looking for a bett

Re: [GENERAL] json-patch support?

2015-03-27 Thread Arthur Silva
On Fri, Mar 27, 2015 at 1:56 PM, Deven Phillips wrote: > Are there any plans or ideas about implement JSON Patch ( > http://jsonpatch.com/) support for PostgreSQL? We deal with some > relatively large JSON documents for our in-house application and it is > often better to just send a json-patch u

Re: [GENERAL] Some indexing advice for a Postgres newbie, please?

2015-02-19 Thread Arthur Silva
On Thu, Feb 19, 2015 at 2:14 PM, Brian Dunavant wrote: > You should consider a BitString. > http://www.postgresql.org/docs/9.4/static/datatype-bit.html > > On Thu, Feb 19, 2015 at 11:10 AM, brian wrote: > > > > Hi folks, > > > > I have a single-user application which is growing beyond the > > fi

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Arthur Silva
On Jan 6, 2015 3:12 PM, "Michael Heaney" wrote: > > I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like to hear from the experts before proceeding down this path. > > Essentially, I'm trying to model the relationship between a

Re: [GENERAL] Storing Video's or vedio file in DB.

2014-12-17 Thread Arthur Silva
This! I'm surprised it took so long to somebody suggest an object store. On Dec 17, 2014 9:22 PM, "Jonathan Vanasco" wrote: > > I wouldn't even store it on the filesystem if I could avoid that. > Most people I know will assign the video a unique identifier (which is > stored in the database) and

Re: [GENERAL] Help Optimizing a Summary Query

2014-12-11 Thread Arthur Silva
al I am using a GIST index on user.name. > > I was really more interested in the LEFT OUTER JOINs vs EXISTS queries and > if there was a better alternative I had not considered. > > On Tue, Dec 9, 2014 at 11:44 AM, Arthur Silva wrote: > >> On Tue, Dec 9, 2014 at 4:18 PM, R

Re: [GENERAL] Help Optimizing a Summary Query

2014-12-09 Thread Arthur Silva
On Tue, Dec 9, 2014 at 4:18 PM, Robert DiFalco wrote: > I'm sorry, I missed a JOIN on the second variation. It is: > > SELECT u.id, u.name, u.imageURL, u.bio, >CASE > WHEN f.friend_id IS NOT NULL THEN 'isFriend' > WHEN s.to_id IS NOT NULL THEN 'hasSentRequest' > WHEN r.to_id

[GENERAL] Dynomite from Netflix - Making Non-Distributed Databases, Distributed

2014-11-03 Thread Arthur Silva
d on top of Postgres. Ps: It's writen in C and Apache licensed. -- Arthur Silva