0

I have one or two views which has a lot of fields to show and all of this fields are in filter criteria as exposed filter. now the problem is acting in low speed.

the solution I am now thinking about is to index some fields which are more in use as filter criteria. But I don't know if it has any bad effect on performance or not. Or does it effect views automatically or I should rebuild all views to see the indexing result.

please let me know more about indexing tables in drupal or if you know any better solution let me know!

2 Answers 2

0

The gains far outweigh any drawbacks; I'd add the index.

4
  • I didn't get you. please make your mind more clear.
    – shekoufeh
    Commented Sep 2, 2015 at 8:30
  • Add indexes. The draw backs are that db writes might take a ms longer; the gains are that select query run times can be reduced over 1000+% depending on the table size
    – mikeytown2
    Commented Sep 2, 2015 at 19:01
  • thanks alot for nice information. the other question is if I have to make my views from scratch after indexing table
    – shekoufeh
    Commented Sep 3, 2015 at 4:03
  • MySQL will usually take advantage of the index. This is a good guide on the subject: percona.com/blog/2015/04/27/…
    – mikeytown2
    Commented Sep 3, 2015 at 18:16
0

In drupal 7 and in Drupal 8 now in views you must use entity render + views_modes instead of field on by one ( in format collum ) for use totaly the system cache. In views already you can configure the cache for accelerate you request time significantly.

1
  • neither entity render nor caching views is a solution for me as I need a table query which should show the real time results
    – shekoufeh
    Commented Sep 2, 2015 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.