• last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changed the representation of tree_sortkeys from "text" to "bit varying".

    • -41
    • +23
    ./postgresql/content-keyword.sql
  1. … 55 more files in changeset.

After importing openacs.org users, forums and messages I discovered that it

took literally several minutes to load the APM's home page. This was due

to a rather stupid subselect of the form:

select count(*)

from content_revisions r

where r.revision_id = content_item.get_latest_revision(item_id)

where item_id comes from the package versions table.

It's stupid in both PG and Oracle because get_latest_revision already

joins the latest_revision_id value from cr_items with the content

revisions table thus a simple check for a null return by get_latest_revision

would be sufficient.

It's *really* stupid in Oracle because Oracle won't use the index on

revision_id when checking NULLs so we get two sequential scans of the

cr_revisions table tucked into that one itty-bitty subquery (itself called

once for each package version in ths system).

Which explains why I hadn't noticed it while working on scalability testing

in PG - PG uses the index because its btree index structure handles NULLs.

Meaning this query only fell apart at a rate of O(log2(R)) rather than O(R)

as in Oracle (R being the number of revision objects in the system).

My solution was to rewrite the subselect using "case" rather than "count(*)"

and also to speed up get_latest_revision by having it check for NULL and

return NULL immediately rather than execute the query (in PG this is

accomplished by declaring the function "isstrict", and the executor won't

even call the function if the argument's NULL, making it REALLY fast!).

  1. … 2 more files in changeset.

1. The PG port of apm__register_parameter had a tiny error which caused it

to not set the new parameter to its default value in any of the effected

package instances.

2. Glossary - added admin as a parent of glossary_admin so admins can admin.

3. edit-this-page PG: removed code that was written because of #1 above

4. edit-this-page Oracle: finished the datamodel port, added drop script

  1. … 8 more files in changeset.

1. Fixed permissions bug in the PG version (missing OR clause in a view)

2. Added (untested thus far) site-wide-search to glossary

3. Added centralized support for importing files into the CR (either into

the filesystem or the database).

4. Fixed wp-slim. Fixed it some more. Fixed it again. It still needs

more fixing.

  1. … 54 more files in changeset.

1. Typo in the alter table in the PG version ...

2. Just folded the alter tables into the cr_folders table definition. This

is still pre-beta ...

added package_id to cr_folders

added a constraint

added package_id to cr_folders

fixed mutating tables problem with cr_cleanup_cr_files_del_trg trigger

fixed mutating tables problem with cr_cleanup_cr_files_del_trg trigger

Dave Bauer's patches ...

*** empty log message ***

  1. … 7 more files in changeset.

A variety of minor fixes ...

  1. … 3 more files in changeset.

Fixed Dan's new trigger ...

more image handling fixes submitted by Walter McGinnis

fixed delete file trigger

fixed infinite recursion problem with cr_keywords update trigger

added support for multiple file storage areas

  1. … 4 more files in changeset.
added name method support for content_revision type

  1. … 4 more files in changeset.
moved CMS stuff to CR so that content can be displayed by the search interface without requiring the user to load cms

  1. … 21 more files in changeset.
updated search support to include templates and images

  1. … 5 more files in changeset.
added virtual url support for CR

  1. … 5 more files in changeset.
removed DataProvider Contract Temporarily

  1. … 1 more file in changeset.
added dependency for acs-service-contract

  1. … 1 more file in changeset.
modified CR to provide the FtsContentProvider interface

  1. … 2 more files in changeset.
added service content support to convert CR into a content provider for search

fixed definition of item relationships

fixed closing of cursors after an exception

  1. … 4 more files in changeset.
fixed RI problem with oracle due to text not being an allowed storage_type

fixed template functions

  1. … 2 more files in changeset.