473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

indexes on columns and functions

You can CREATE INDEX on multiple columns, and you can CREATE INDEX on a functions, but can
you create an index on multiple columns and functions? For example if I want to create an
index on lower(textfield), intfield
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #1
1 1525
On Wed, 2 Jul 2003, Joseph Shraibman wrote:
You can CREATE INDEX on multiple columns, and you can CREATE INDEX on
a functions, but can you create an index on multiple columns and
functions? For example if I want to create an index on
lower(textfield), intfield


In 7.3 or earlier you'd have to write a mangling function that took
multiple columns did functions you wanted and appended the fields together
in some fashion I believe. In 7.4 you can make a index like the above
with something like
create index foo on tab((lower(textfield)), intfield)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve_CA | last post by:
Hi, The more I read, the more confused I'm getting ! (no wonder they say ignorance is bliss) I just got back from the bookstore and was flipping through some SQL Server Administration...
9
by: Igor | last post by:
Is there a way to force optimizer to use indexes without hints? (some server setting or index type...) I'll give an example to clarify : I have a table with fields Customer_Code char(10) not...
3
by: serge | last post by:
Someone was explaining me the following: 1- NULL values is NOT good for a column that has an index 2- Therefore, all columns have default values of : - 0 for numbers - " " for strings I...
3
by: Randell D. | last post by:
Folks, My internet access is intermitent until I get my own connection inside the next ten days - I say this so that I can thank in advance who ever gives a few seconds to read/answer my...
2
by: Jeff MacDonald | last post by:
Hi, I have a table, where one of the columns "extradata" is a gob of XML. I'd like to be able to create an index on this function.. so i tried this CREATE INDEX actitemsXML_idx ON act_items...
4
by: robert | last post by:
my colleagues are convinced that having more than an index or two destroys performance on their batch runs. could be. i don't have the data, and i'm wondering whether there might be some...
4
by: bwmiller16 | last post by:
Guys - I'm doing a database consistency check for a client and I find that they're building unique indexes for performance/query reasons where they could be using non-unique indexes. Note...
2
by: rAinDeEr | last post by:
Hi, I have a table with the following definition. The primary key is west_nme and west_eff_tms and i have created unique index on them. The foreign keys which reference other parent tables are...
0
by: okonita | last post by:
Hi all, I need to create one or two indexes on date columns to support MAX and MIN aggregate functions on a very large table and to make the SQL perform/run faster. I remember a group discussion...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.