Timeline for How to improve the SQL query or change the table structure in postgresql?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 21, 2017 at 5:18 | comment | added | Krishna Rani Sahoo | Hi @indiri, I have added index for lower(name) in brands table. Added the SQL statement for adding index for brands name in lower case. | |
Aug 18, 2017 at 23:32 | comment | added | indiri | It's better now as products will be using the index. However brands is still not using it yet and looks to be using a sequential scan still. Do you have an index on brands for lower(brand) as well? If not it looks like you may want to add it. | |
Aug 18, 2017 at 12:22 | comment | added | Krishna Rani Sahoo | Hi @indiri, I have modified my question with latest EXPLAIN plan after implementing combined index for lower(brand) and created_at of products table and brands table. Can you verify if the query plan will help in improving the SQL execution | |
Aug 17, 2017 at 16:12 | history | answered | indiri | CC BY-SA 3.0 |