| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Kendall Koning <kkoning(at)egl(dot)net>, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: CIDR index use for '<<' operator | 
| Date: | 2000-10-09 07:38:42 | 
| Message-ID: | 200010090738.DAA05696@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Added to TODO.
> "Kendall Koning" <kkoning(at)egl(dot)net> writes:
> > Postgres doesn't seem to make use of indexes when doing operations with the
> > CIDR '<<' (contains) operator.
> 
> You're right --- the system has no idea that the '<<' operator has any
> relationship to the sort ordering of CIDR indexes.
> 
> Seems like it'd be possible to improve this along the same lines that
> we use to make LIKE and regexp matches indexable: derive lower and
> upper bounds on the CIDR variable from a 'cidr-var << cidr-constant'
> clause, and use those to create 'cidr-var >= lower-bound AND
> cidr-var <= upper-bound' indexscan limit clauses.
> 
> If you feel like tackling this, the "special index operator" support
> in src/backend/optimizer/path/indxpath.c is the stuff that'd need to
> be extended.
> 
> 			regards, tom lane
> 
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gunnar R|nning | 2000-10-09 07:46:16 | Re: Re: JDBC Performance | 
| Previous Message | Philip Warner | 2000-10-09 06:55:17 | Re: How does TOAST compare to other databases' mechanisms? |