stgresql.org [mailto:pgsql-general-
> > ow...@postgresql.org] On Behalf Of DaNieL..!
> > Sent: Tuesday, June 23, 2009 9:44 AM
> > To: pgsql-gene...@postgresql.org
> > Subject: Re: [GENERAL] Please suggest me on my table design (indexes!)
>
> > Yes, after my post i've t
I thought to analyze the input chars to avoid useless searches, for
example, if the digit is EX, where X is number, it is the
user_code, and i'll search just that field; otherwise if the digit is
an email, i'll look only at the email column.
But, the things get little deeper, with the custom f
DaNieL wrote:
Hi guys, im tryin to optimize a simple table, suited for contain
users.
So, my table at the moment is:
-
CREATE TABLE contacts(
id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE,
company_id BIGINT,
code varchar(10),
company_name varchar(120),
name varchar(120),
surname varchar(120
ql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of DaNieL..!
> Sent: Tuesday, June 23, 2009 9:44 AM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Please suggest me on my table design (indexes!)
>
> Yes, after my post i've tryed the v
Yes, after my post i've tryed the versione with 2 separate table (a
copy of the contact table) with inside just the employees, and, with
my surprise, the query planner looks identical, both with 1 big table
and with 2 splitted table.
This sound a bit strange for me, becose in my test the 'employees
2009/6/23 DaNieL..! :
> The `problem` is that i dont know if having so many indexes will raise
> problems as the data dimension grown.
> That seem to be not very efficient: http://explain.depesz.com/s/Q0m
Well, this is slow, because for some reason postgres decided to use
seq scan on contact e.
A
The `problem` is that i dont know if having so many indexes will raise
problems as the data dimension grown.
And i am not even sure that this design is truly reliable;
For example, if i would to know how many employees have every company,
i'll have to run that query:
-
EXPLAIN ANALYZE
SELECT
it looks ok on explain, that is - the cost isn't too high.
So what's the problem ?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Almost forgot: one fo the heavier select query can be:
-
SELECT
contact.id,
contact.company_id,
contact.name AS nome,
contact.surname AS cognome,
contact.email AS email,
contact.company_name AS azienda
FROM
contact
WHERE
(
lower(contact.company_name) LIKE 's
Hi guys, im tryin to optimize a simple table, suited for contain
users.
So, my table at the moment is:
-
CREATE TABLE contacts(
id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE,
company_id BIGINT,
code varchar(10),
company_name varchar(120),
name varchar(120),
surname varchar(120),
phone varcha
10 matches
Mail list logo