What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Database Problem!


Janifar

Banned
Messages
159
Likes
24
How to write code for creating index? Also what's the necessity to use this indexing system??
 

webdesign

New Member
Messages
2
Likes
1
I'm not pretty sure on your question because there are types of creating. Anyway, if you want to create index using SQL here's how: CREATE INDEX index_name
ON table_name (column_name) but if you want to create index in another schema then try to do this

CREATE [ UNIQUE | BITMAP ] INDEX [ schema. ]index


ON { cluster_index_clause


| table_index_clause


| bitmap_join_index_clause


} ;
 

batjko

Member
Messages
21
Likes
3
Regarding your other question:

You use indexes in order to enhance the performance of SQL queries on a table. Like in a book, an index helps the database engine find the correct data for a specific SQL query, by telling it where to find the row, based on a specific order.

So before creating your index you need to know what the most frequent and most intensive queries on your table is which you want to make faster with that index. The columns in that SELECT statement and WHERE clauses determine which ones you need to include in the index and how.

It's not as easy as executing a CREATE INDEX statement and be done with it. There are also different types of indexes, which may or may not be appropriate for your purposes.
I would advise you to do that due diligence first and read up on indexes for your database and then look at the queries for that table you want to create your index for.

Hope that helps.
 
Last edited:

Top