Re: [GENERAL] Optimizing queries that use multiple tables and many order by columns

2010-08-26 Thread Joshua Berry
On Thu, Aug 26, 2010 at 2:51 AM, Wappler, Robert wrote: > Do you really have the requirement to sort anything? Or let me ask it > the other way round: Assuming you have too much data, to sort it on the > application side, which user can read all this from one single table in > the user interface?

Re: [GENERAL] Optimizing queries that use multiple tables and many order by columns

2010-08-26 Thread Wappler, Robert
On 2010-08-25, Joshua Berry wrote: > --Here's what explain analyze says for the query > explain analyze > declare "SQL_CUR0453D910" cursor with hold for > select Anl.Priority, Anl.Lab, Anl.Job, JOB.DateIn, > JOB.CompanyCode, Anl.SampleName > from analysis anl join job on anl.job = job.job > order

Re: [GENERAL] Optimizing queries that use multiple tables and many order by columns

2010-08-25 Thread Joshua Berry
On Wed, Aug 25, 2010 at 10:40 AM, Wappler, Robert wrote: > On 2010-08-25, Joshua Berry wrote: > > > Here's my latest culprit: > > > > select Anl.Priority, Anl.Lab, Anl.Job, JOB.DateIn, > > JOB.CompanyCode, Anl.SampleName > > from analysis anl join job on anl.job = job.job > > order by job.companyc

Re: [GENERAL] Optimizing queries that use multiple tables and many order by columns

2010-08-25 Thread Wappler, Robert
On 2010-08-25, Joshua Berry wrote: > Hi Group, > > I've never really learned how to optimize queries that join > several tables and have order by clauses that specify columns > from each table. Is there documentation that could help me > optimize and have the proper indexes in place? I've read >