Re: OPtimize the performance of a query

2018-01-16 Thread Gavin Flower
Hi Hmidi, On 17/01/18 06:57, hmidi slim wrote: I changed the operator like and I'm using the operator = .I got the results much faster but I still have another question about operator. For difference should I use '<>' or 'is distinct from' with indexes? 2018-01-16 17:49 GMT+01:00 Pavel Stehul

Re: OPtimize the performance of a query

2018-01-16 Thread Pavel Stehule
2018-01-16 19:35 GMT+01:00 hmidi slim : > Thank you for your advices and thanks for all people who give me some best > practises and useful ideas. > you are welcome Regards Pavel

Re: OPtimize the performance of a query

2018-01-16 Thread hmidi slim
Thank you for your advices and thanks for all people who give me some best practises and useful ideas.

Re: OPtimize the performance of a query

2018-01-16 Thread Pavel Stehule
Hi 2018-01-16 18:57 GMT+01:00 hmidi slim : > I changed the operator like and I'm using the operator = .I got the > results much faster but I still have another question about operator. For > difference should I use '<>' or 'is distinct from' with indexes? > https://en.wikipedia.org/wiki/Posting_

Re: OPtimize the performance of a query

2018-01-16 Thread hmidi slim
I changed the operator like and I'm using the operator = .I got the results much faster but I still have another question about operator. For difference should I use '<>' or 'is distinct from' with indexes? 2018-01-16 17:49 GMT+01:00 Pavel Stehule : > Hi > > 2018-01-16 17:44 GMT+01:00 hmidi slim

Re: OPtimize the performance of a query

2018-01-16 Thread Pavel Stehule
Hi 2018-01-16 17:44 GMT+01:00 hmidi slim : > Sorry I forget the lower command when I wrote the code, it is like this: > lower(g.country_code) like lower('US') > (lower(g.feature_class) like lowwer('P') or lower(g.feature_class) like > lower('L')) > please, don't do top post. Your query must be

Re: OPtimize the performance of a query

2018-01-16 Thread Alban Hertroys
> On 16 Jan 2018, at 17:32, hmidi slim wrote: > > Hi, > I have two tables in the same database: geoname and test_table. > The geoname table contains many columns which are: name, feature_class, > feature_code, admin1, admin2,admin3, name and so on. > The second table 'test_table' contains only

Re: OPtimize the performance of a query

2018-01-16 Thread Melvin Davidson
On Tue, Jan 16, 2018 at 11:46 AM, James Keener wrote: > Do you have any indecies? https://www.postgresql.org/ > docs/current/static/indexes-expressional.html might be helpful to you. > > Also, EXPLAIN will help you understand how your query is being run and > where it can be improved. > > https:/

Re: OPtimize the performance of a query

2018-01-16 Thread James Keener
Do you have any indecies? https://www.postgresql.org/docs/current/static/indexes-expressional.html might be helpful to you. Also, EXPLAIN will help you understand how your query is being run and where it can be improved. https://www.postgresql.org/docs/current/static/using-explain.html http://pos

Re: OPtimize the performance of a query

2018-01-16 Thread hmidi slim
Sorry I forget the lower command when I wrote the code, it is like this: lower(g.country_code) like lower('US') (lower(g.feature_class) like lowwer('P') or lower(g.feature_class) like lower('L')) 2018-01-16 17:40 GMT+01:00 Martin Moore : > > > >Hi, > > >I have two tables in the same database: ge

OPtimize the performance of a query

2018-01-16 Thread hmidi slim
Hi, I have two tables in the same database: geoname and test_table. The geoname table contains many columns which are: name, feature_class, feature_code, admin1, admin2,admin3, name and so on. The second table 'test_table' contains only the columns: city, state. There is no join between the two tab