Re: Slow response to my query
Steven Pousty <[email protected]> Thu, 28 Nov 2019 08:11:43 -0800
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAKmB1PGVTk=mEoLA2O4ZqsbmW3RDDriYXJhKsk75+BpvcLSDdw@mail.gmail.com> |
--0000000000007adc1105986a60cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sounds like you should do an EXPLAIN in front of your query and see what the query planner is thinking. If you can spare the 1.5 hours do an EXPLAIN ANALYZE. It should be safe as long as you are only doing a select query. Thanks Steve On Thu, Nov 28, 2019 at 7:13 AM Bzzzz <[email protected]> wrote: > On Thu, 28 Nov 2019 10:38:22 +0100 > Goke Aruna <[email protected]> wrote: > > > however, do you have ant specific test to run with the pgbench? > > Nope, I don't have the man in mind - read it and adapt your test to your > problem. > > BTW, you did not say it, but I suppose you're using rust not SSDz? > > > I have about 6 of my columns indexed. > > Are they involved in your query? > > > I will share the test query once i got the queries from the UI man. > > ? Without the table and it's indexes structures plus the query, it's like > a car without an engine (or a chauffeur)=E2=80=A6 > > Also, read this: > https://hakibenita.com/be-careful-with-cte-in-postgre-sql > and that: > https://www.2ndquadrant.com/en/blog/on-rocks-and-sand/ > > Jean-Yves > > > --0000000000007adc1105986a60cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Sounds like you should do an <br></div><div>EXPLAIN <= br></div><div>in front of your query and see what the query planner is thin= king. If you can spare the 1.5 hours do an EXPLAIN ANALYZE. It should be sa= fe as long as you are only doing a select query.</div><div>Thanks</div><div= >Steve<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Thu, Nov 28, 2019 at 7:13 AM Bzzzz <<a href=3D"mailto= :[email protected]">[email protected]</a>> wrote:<br></div><blockquote c= lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli= d rgb(204,204,204);padding-left:1ex">On Thu, 28 Nov 2019 10:38:22 +0100<br> Goke Aruna <<a href=3D"mailto:[email protected]" target=3D"_blank">goksie= @gmail.com</a>> wrote:<br> <br> > however, do you have ant specific test to run with the pgbench?<br> <br> Nope, I don't have the man in mind - read it and adapt your test to you= r<br> problem.<br> <br> BTW, you did not say it, but I suppose you're using rust not SSDz?<br> <br> > I have about 6 of my columns indexed.<br> <br> Are they involved in your query?<br> <br> > I will share the test query once i got the queries from the UI man.<br= > <br> ? Without the table and it's indexes structures plus the query, it'= s like<br> a car without an engine (or a chauffeur)=E2=80=A6<br> <br> Also, read this:<br> <a href=3D"https://hakibenita.com/be-careful-with-cte-in-postgre-sql" rel= =3D"noreferrer" target=3D"_blank">https://hakibenita.com/be-careful-with-ct= e-in-postgre-sql</a><br> and that:<br> <a href=3D"https://www.2ndquadrant.com/en/blog/on-rocks-and-sand/" rel=3D"n= oreferrer" target=3D"_blank">https://www.2ndquadrant.com/en/blog/on-rocks-a= nd-sand/</a><br> <br> Jean-Yves<br> <br> <br> </blockquote></div> --0000000000007adc1105986a60cb--