Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Martha Driscoll
Thanks for the explanation everyone. Now I understand the planner did not use the index at all because the deleted condition was not specified in the original query. I'm always happy to learn more about the database and appreciate the link to the partial index documentation. Martha Driscoll

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 12:36 PM, Joshua D. Drake wrote: > I think this is a false test. You don't have an index on > asset.copy(barcode). See: Yes, I know. The databases I ran the explain on were using stock(ish) Evergreen schemas, where the only index on asset.copy (barcode) was the part

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Joshua D. Drake
On 04/26/2013 12:32 PM, Galen Charlton wrote: Hi, On Fri, Apr 26, 2013 at 12:25 PM, Joshua D. Drake wrote: Granted if a unique index is required we can use a unique index as well. My only point was adding a secondary partial index was probably not the way to go and that adding a generic ind

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Joshua D. Drake
On 04/26/2013 12:14 PM, Galen Charlton wrote: And if the evidence of these explains is any guide, although the query parser has gotten smarter since 8.4, even in 9.1 the query parser isn't quite smart enough to detect *all* of the variants of asserting a condition on a boolean column and pick t

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 12:25 PM, Joshua D. Drake wrote: > Granted if a unique index is required we can use a unique index as well. My > only point was adding a secondary partial index was probably not the way to > go and that adding a generic index on barcode would service the user better.

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Joshua D. Drake
On 04/26/2013 12:21 PM, Galen Charlton wrote: Hi, On Fri, Apr 26, 2013 at 12:11 PM, Joshua D. Drake wrote: Dropping the partial index and only relying on asset.copy(barcode): Dropping the partial index also means dropping the constraint enforcing the uniqueness of non-deleted item barcode

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 12:11 PM, Joshua D. Drake wrote: > Dropping the partial index and only relying on asset.copy(barcode): Dropping the partial index also means dropping the constraint enforcing the uniqueness of non-deleted item barcodes. That's a pretty important constraint as far as

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 11:51 AM, Dan Scott wrote: > And deliberately so, because at the time the index was adjusted to be > duplicative, PostgreSQL (8.4 IIRC?) was not smart enough to know that > "deleted = FALSE" was the same as "deleted IS FALSE"; and as we were > often writing ad hoc quer

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Joshua D. Drake
On 04/26/2013 11:51 AM, Dan Scott wrote: Before declaring something "wrong" so confidently, you might want to double-check your assumptions. Random sample of course: select id from asset.copy where barcode IN ('2018115739', '2016960839','35983832','42721126','36881043', '43051945','48323042

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Dan Scott
On Fri, Apr 26, 2013 at 11:43:18AM -0700, Joshua D. Drake wrote: > > On 04/26/2013 11:17 AM, Galen Charlton wrote: > > > >Hi, > > > >On Fri, Apr 26, 2013 at 10:58 AM, Martha Driscoll > >wrote: > >>In our database of 3,161,189 copies, cutting out the deleted copies > >>eliminates only 904 copies.

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Joshua D. Drake
On 04/26/2013 11:17 AM, Galen Charlton wrote: Hi, On Fri, Apr 26, 2013 at 10:58 AM, Martha Driscoll wrote: In our database of 3,161,189 copies, cutting out the deleted copies eliminates only 904 copies. Why does testing for deleted improve searching so significantly? The quick answer is t

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 11:17 AM, Galen Charlton wrote: > Hi, > The quick answer is that the asset.copy index on the barcode column > also includes a clause to limit the index to copies that aren't > deleted: This part of the PostgreSQL documentation is worth a read to learn more about parti

Re: [OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 10:58 AM, Martha Driscoll wrote: > In our database of 3,161,189 copies, cutting out the deleted copies > eliminates only 904 copies. Why does testing for deleted improve searching > so significantly? The quick answer is that the asset.copy index on the barcode column

[OPEN-ILS-GENERAL] SQL Query Performance

2013-04-26 Thread Martha Driscoll
We are working on a script to query the Evergreen database for circulation statistics for a given set of copy barcodes. We use Syrup for course reserves which is a separate database that has the copy barcodes for each item on reserve. We were finding the queries very slow, up to 45 seconds to

[OPEN-ILS-GENERAL] Report question: Need detailed cash report by workstation or org unit

2013-04-26 Thread Deborah Luchenbill
I'm hoping some of you report experts out there can help me with this request... One of our library systems needs a detailed cash report to send to their accountant, which contains all the transactions and what they were for by workstation or library (there are 3 branches). They noticed, in the r

Re: [OPEN-ILS-GENERAL] Fwd: Re: Demo server for 2.4

2013-04-26 Thread Galen Charlton
Hi, On Fri, Apr 26, 2013 at 9:53 AM, Kathy Lussier wrote: > On another note, EduSys Inc. also offered to provide the 2.4 community > demo server. It didn't make sense to have two community servers running the > same version of Evergreen, so I'm wondering if there's a need for another > demo serv

[OPEN-ILS-GENERAL] Fwd: Re: Demo server for 2.4

2013-04-26 Thread Kathy Lussier
Hi all, I'm just forwarding along this message from David Busby regarding the availability of a community demo server for 2.4. I just downloaded the client and logged in, so all seems to be in working order. However, you will need to add an SSL Exception to connect. Many thanks to David! On

Re: [OPEN-ILS-GENERAL] Changing settings for staff client browser

2013-04-26 Thread Kathy Lussier
Hi Chris, There is no way to do that yet, but there is an outstanding Launchpad bug related to this issue - https://bugs.launchpad.net/evergreen/+bug/1084758. You might want to click the link the "Does this bug affect you?" link to generate heat on the bug report. Kathy Kathy Lussier Proje

[OPEN-ILS-GENERAL] Changing settings for staff client browser

2013-04-26 Thread Chris Owens
Title: Sincerely, I am wondering if we have the ability to change the font size settings for the TPAC window in the staff client? And, if so, where? I found some previous discussion on this topic but not sure if anything

Re: [OPEN-ILS-GENERAL] Evergreen Newsletter - Need your Conference Feedback

2013-04-26 Thread Kivilahti Olli-Antti
Top of the morning Madam Terlaga. This was my second Evergreen International Conference and I have to say it is always worth the trip to see all the "cool kids". It is a great opportunity to actually meet the people behind aliases and email addresses. I have never left these conferences empty h