Indexing

Questions and answers regarding general SQL and backend databases

Indexing

Postby Morley » Wed Apr 21, 2004 10:43 pm

Indexing appears not to be automatic when relationships are created. How is indexing turned on? Where can one get feedback on what's indexed and what's not?
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby jcompagner » Wed Apr 21, 2004 11:09 pm

not yet.. Will be in further version >2
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby Westy » Thu Apr 22, 2004 2:46 am

You can put an index on a field using Sybase Central. Depending on your solution you may not need indexing. With the Firebird database I found that with tables of 20,000 records I did not need indexing, and Sybase appears to be significantly faster than Firebird. It really depends on what you are trying to do. However, just because you may have needed indexing when developing with another platform, do not assume that you will need it with Servoy.
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Indexing

Postby Morley » Thu Apr 22, 2004 2:08 pm

Westy wrote:You can put an index on a field using Sybase Central. Depending on your solution you may not need indexing. With the Firebird database I found that with tables of 20,000 records I did not need indexing, and Sybase appears to be significantly faster than Firebird. It really depends on what you are trying to do. However, just because you may have needed indexing when developing with another platform, do not assume that you will need it with Servoy.


In FileMaker Pro we're used to indexing for foreign keys, haven't turned on indexing for much else.

You're saying Indexing is no longer strictly required, is much more for performance issues. Interesting.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Re: Indexing

Postby bcusick » Sat Apr 24, 2004 7:32 am

Morley wrote:Indexing appears not to be automatic when relationships are created. How is indexing turned on? Where can one get feedback on what's indexed and what's not?


The world of SQL is VERY different than the world of FileMaker! :D

In SQL if you index a column - it can be SLOWER than a non-indexed field. GENERAL RULE: If you have less than 50,000 to 100,000 records - NO NEED TO INDEX.

Cheers,

Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: Indexing

Postby Morley » Sat Apr 24, 2004 5:23 pm

bcusick wrote:
Morley wrote:Indexing appears not to be automatic when relationships are created. How is indexing turned on? Where can one get feedback on what's indexed and what's not?


The world of SQL is VERY different than the world of FileMaker! :D

In SQL if you index a column - it can be SLOWER than a non-indexed field. GENERAL RULE: If you have less than 50,000 to 100,000 records - NO NEED TO INDEX.

Cheers,

Bob Cusick


If indexing isn't mandatory, why index at all then? I'm startled at the concept of indexing reducing speed. I well remember the speedy days of FMP1 and 2 when ALL fields were indexed and FMP ran like lightning.

Also, is it possible in Servoy to automatically turn indexing on or off when record count exceeds or reduces to a particular record count?
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby maarten » Sat Apr 24, 2004 8:15 pm

If you're new to SQL, here's a good link to get you started.
IT will give you a general basic knowledge about SQL
http://members.tripod.com/er4ebus/sql/
This chapter specifically discusses indexing.
http://members.tripod.com/er4ebus/sql/ch10.htm
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby jcompagner » Sat Apr 24, 2004 8:18 pm

indexing is something for the database, not servoy.

Some databases auto index FK columns.. (thats how they maintain integrity) others don't.

Especially for string (like) searches indexen can help.

Some database do it on demand (they look what you are doing and make an index for you)

Just look how youre database works, and look what columns you search on in youre big queries and make an index on those)

index can reduce speed on updates and insertes, because besides the record itself it also needs to update the index.

Many databases have tools where you can learn what queries are costing and how they are looked up internally in the database. This way you can learn to make youre index. (avoid full tablescans)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 19 guests