Re: We find few queries running three times simultaneously with same parameters on postgres db
> > > Am 26.06.2018 um 12:19 schrieb amandeep singh: > >> We have been observing our postgres database from past few days,We found >> few queries running three times simultaneously with same parameters.I would >> like to back track how a query is running multiple times. > > Can you check the requests made by your application/ ORM? This looks like application is making multiple requests, rather than something happening on the database?
Re: table is hanging
Which query are you trying to run? On Fri, May 31, 2019, 16:45 Sonam Sharma wrote: > I only fetched 2 rows and it's responding > > On Fri, May 31, 2019, 4:39 PM Nicklas Avén > wrote: > >> To find out if there is some locking problem or just takes time for the >> client to handle the data, ask just for a small subset of the table. >> >> >> If >> >> select * from table limit 1; >> >> works it is probably just taking a lot of time to send all the data to >> the client. >> >> If the data set includes something large also 1 ow can be heavy. >> >> You can even try with limit 0 to just find out if the table responses. >> >> The client software is often the largest bottleneck, not the database. >> >> >> /Nicklas >> >> >> >> On 5/31/19 1:03 PM, Sonam Sharma wrote: >> >> ADding to this, this no of records are present on this table : 19087314 >> >> On Fri, May 31, 2019 at 4:28 PM Sonam Sharma >> wrote: >> >>> Hi Team , >>> >>> when i am trying to do select on one table , its hanging and not giving >>> any output. >>> Can someone please advice what should I check for this ? >>> >>
Re: Large scale reliable software system
> Correct. It’s a tragically wrong piece of folk wisdom that’s pretty general across web development communities. So, what's your advice, and is there some book / resource to get upto speed? Thanks! On Tue, Jun 27, 2023 at 10:38 AM Guyren Howe wrote: > Correct. It’s a tragically wrong piece of folk wisdom that’s pretty > general across web development communities. > > On Jun 26, 2023, at 21:32, Michael Nolan wrote: > > It's not just Ruby, dumb databases are preferred in projects like > WordPress, Drupal and Joomla, too. > > Now, if it's because they're used to using MySQL, well maybe that's > not so hard to understand. :-) > > On Mon, Jun 26, 2023 at 8:05 PM Guyren Howe wrote: > > > This is a reasonable answer, but I want to offer a caveat. > > Likely because of the influence of the originator of Ruby on Rails, it is > close to holy writ in the web development community that the database must > be treated as a dumb data bucket and all business logic must be implemented > in the Ruby or Python or whatever back end code. > > This heuristic is nearly always mostly wrong. > > Guyren G Howe > On Jun 26, 2023 at 17:48 -0700, Adrian Klaver , > wrote: > > On 6/26/23 16:48, B M wrote: > > Dear all, > > After greeting, > > I taught PostgreSQL myself and developed a small scale > experimentalsoftware system using PostgreSQL in the back-end. > > I would like to know your advices to develop a large scale reliable > software system using PostgreSQL in the back-end, through which i can > share the storage with the different system users where they login to > the system through the web application front-end with different > passwords and usernames , save the privacy of each user data, improve > overall system security and performance, achieve fast response, make > backups and save the stored data from loss. The system will be hosted on > a cloud. > > > https://www.djangoproject.com/ > > > Thank you in advance. > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > > >
Re: Need help on query optimization
> > > Here B is a ltree column, E is a jsonb column. > It may also help to mention the indexes and their types. eg. Does column B have a GiST index? > > EXPLAIN ANALYZE SELECT * FROM A > > where ( B <@ 'INDIA' ) AND C = 'D' > > AND CAST ( E->'F'->'G'->>'H' AS DATE ) >= '2021-02-01' > > AND CAST ( E->'F'->'G'->>'H' AS DATE ) <= '2021-02-24' > > ORDER BY E -> 'F' ->> 'J' ASC,created_date DESC > > OFFSET 0 ROWS FETCH NEXT 200 ROWS ONLY > > > > "Limit (cost=22009.81..22010.08 rows=105 width=3853) (actual > time=2295.654..2295.688 rows=200 loops=1)" > > " -> Sort (cost=22009.81..22010.08 rows=105 width=3853) (actual > time=2295.651..2295.671 rows=200 loops=1)" > > "Sort Key: (((E -> 'F'::text) ->> 'J'::text)), created_date DESC" > > "Sort Method: top-N heapsort Memory: 355kB" > > "-> Index Scan using task_opp_tlmd_iscmp_idx on task > (cost=0.56..22006.29 rows=105 width=3853) (actual time=3.788..2277.503 > rows=10982 loops=1)" > > " Index Cond: (C = 'D'::ltree)" > > " Filter: ((B <@ 'INDIA'::ltree) AND (E -> 'F'::text) -> > 'G'::text) ->> 'H'::text))::date >= '2021-02-01'::date) AND (E -> > 'F'::text) -> 'G'::text) ->> 'H::text))::date <= '2021-02-24'::date))" > > " Rows Removed by Filter: 14738" > > "Planning Time: 0.418 ms" > > "Execution Time: 2295.981 ms" > > > Thanks & Regards, > > Shubham >
Re: Regex for Word space Word space Word ....
> > > I was trying to make it to match words starting capital letter only. > Does this work? https://regex101.com/r/nf4HCN/1 > > Regards, > David > > On Tue, 23 Nov 2021 at 10:59, chlor wrote: > >> On Tue, Nov 23, 2021 at 11:51 AM Shaozhong SHI >> wrote: >> >>> I tried nested regex '[[A-Z][a-z] ]+[[A-Z][a-z]]' but it did not work. >>> >> >> [A-Z][a-z]+ +[A-Z][a-z]+ >> will match 'Hello World', but not 'Hello world'. Is that what you want? >> >> Try this instead >> [A-Za-z]+ +[A-Za-z]+ >> >> >> And try also this editor to learn regex >> https://regex101.com/ >> >> ./hans >> >>