Backendless Support
 
Solved

"Indexed" Column Constraint on Custom Data Table is not Working

Hello Backendless ,

As Far As I have Experimented and Inferenced upon the Results , I have noticed that Backendless is not indexing custom data tables . For verifying this experiment , I replicated the Data Table of User as "Dummyuser" with exactly the Same Data base Schema : and Applied the Indexed Constraint to Every database Tables. And When I experimented with Searching on the "Dummyuser" , it's taking almost twice the time it had taken over searching the "User Table" . I am wondering if the Indexing is not working as I have read in the discussions or somewhrre that the "User" Table is indexed automatically .

I hope if you guys could reflect on it .

Regards,

Pujan

Leave a Comment

Comments (11)

photo
1

Hi Pujan,

Each table is indexed by objectId.

Following articles could be useful for you:

http://stackoverflow.com/questions/12915623/index-all-columns

http://stackoverflow.com/questions/5446124/mysql-why-not-index-every-field

Regards,

Denys

photo
1

@Denys Konakhevych

Okay , I read the articles . I understood that we should index the table by objectId . By Indexing ObjectId , as per my above question , Why is Dummy Table , with same database Schema taking way too much time to load than the User Table itself.

Regards,

Pujan Paudel

photo
1

Did you replicated User table by import\export operations?

photo
1

@Denys

No I didn't do any Sorts of Import\ export Operations. I just made a Plain Data table ( I replicated User Table just for test Purposes only and nothing more )

Regards

photo
1

Could you please provide your appId?

Regards

photo
1

Hello @Denys Konakhevych

My App ID is : F665896D-EBEB-F072-FFF6-839E12F64800

Can you Please Check what's stopping me from getting Faster Even after Indexing the LightWeightTestUsers Table.

P.S I will be indexing the Objectid of the Other Tables too. So , I'd be glad if you people can find out what's going wrong , or If I have done anything wrong from my part :)

photo
1

How are you going to index objectId? I can only see single constraint - not null constraint for "post_title" column of table "NewPost"

photo
1

Hello Denys,

I did my Experiment on "LightWeightTestUsers" Table where I have indexed the other columns in the Constraint

photo
1

Hello Pujan,

This indexes are useful when you have big amount of records in table and have many search queries by 'userName' or 'profilePictureUrl' columns. But the cost of it is that each insert will cause rebuilding of each of this indexes. Indexes should be used with great careful. There are some advices of using indexes: http://www.tutorialspoint.com/sql/sql-indexes.htm.

Regards,

Denys

photo
photo
1

Following gk could be useful for youhttp://www.gkindiaonline.com/

photo
1

General Knowledge

photo