The indexes the table is supposed to have seem to agree:

      IndexDescription uniqueIndex = new IndexDescription(true,new
String[]{docHashField,jobIDField});
      IndexDescription jobStatusIndex = new IndexDescription(false,new
String[]{jobIDField,statusField});
      IndexDescription jobSeedIndex = new IndexDescription(false,new
String[]{isSeedField,jobIDField});
      IndexDescription failTimeIndex = new IndexDescription(false,new
String[]{failTimeField,jobIDField});
      IndexDescription actionTimeStatusIndex = new
IndexDescription(false,new
String[]{statusField,checkActionField,checkTimeField});
      IndexDescription prioritysetStatusIndex = new
IndexDescription(false,new String[]{statusField,prioritySetField});
      // No evidence that the extra fields help at all, for any database...
      IndexDescription docpriorityIndex = new IndexDescription(false,new
String[]{docPriorityField,statusField,checkActionField,checkTimeField});

The key index is the one you have labeled #2, which seems to be present.
So now the question is why Postgresql is refusing to use it.  What version
of Postgresql is this?  Given the same Postgresql version, I'd love to see
any evidence that postgresql *ever* uses that index.  I *know* it uses it
here, but I'm running 8.7 or something like that...

Karl



On Tue, Apr 23, 2013 at 7:13 AM, Erlend Garåsen <[email protected]>wrote:

> On 23.04.13 12.50, Karl Wright wrote:
>
>  Can you dump the postgresql schema that is in place on the production
>> machine?  Specifically, I want to see the jobqueue table's indexes.
>>
>
> I must use the tools I have available since I'm not having direct access
> to the PostgreSQL server. I cannot use the pg_dump tool.
>
> The seven indices which are available for the jobqueue table is (made
> visible by using "create scrip" in PGAdmin:
>
> 1. CREATE UNIQUE INDEX i1362584563120
>   ON jobqueue
>   USING btree
>   (dochash COLLATE pg_catalog."default", jobid);
>
> 2. CREATE INDEX i1362584563121
>   ON jobqueue
>   USING btree
>   (docpriority, status COLLATE pg_catalog."default", checkaction COLLATE
> pg_catalog."default", checktime);
>
> 3. CREATE INDEX i1362584563122
>   ON jobqueue
>   USING btree
>   (status COLLATE pg_catalog."default", priorityset);
>
> 4. CREATE INDEX i1362584563123
>   ON jobqueue
>   USING btree
>   (status COLLATE pg_catalog."default", checkaction COLLATE
> pg_catalog."default", checktime);
>
> 5. CREATE INDEX i1362584563124
>   ON jobqueue
>   USING btree
>   (failtime, jobid);
>
> 6. CREATE INDEX i1362584563125
>   ON jobqueue
>   USING btree
>   (isseed COLLATE pg_catalog."default", jobid);
>
> 7. CREATE INDEX i1362584563126
>   ON jobqueue
>   USING btree
>   (jobid, status COLLATE pg_catalog."default");
>
> I *have* deleted the MCF tables manually before in case that operation
> caused problems. Just mentioning.
>
>
> Erlend
>
> --
> Erlend Garåsen
> Center for Information Technology Services
> University of Oslo
> P.O. Box 1086 Blindern, N-0317 OSLO, Norway
> Ph: (+47) 22840193, Fax: (+47) 22852970, Mobile: (+47) 91380968, VIP:
> 31050
>

Reply via email to