Search Postgresql Archives

Best method to compare subdomains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a recommended, high performance method to check for subdomains?

Something like:
- www.google.com is subdomain of google.com
- ilikegoogle.com is not subdomain of google.com

There are many ways to do this (lowercase and reverse the string,
append a '.' if not there, append a '%', and do a LIKE).  But I'm
looking for one that will perform well when the master domain list is
an indexed field in a table, and when the possible subdomain is either
an individual value, or a field in a table for a join (potentially
indexed).


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux