From: | Miso Hlavac <hlavki(at)medium13(dot)sk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | exclusive access |
Date: | 2003-11-19 13:49:33 |
Message-ID: | 146273007.20031119144933@medium13.sk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I develop web application. My case model consists of many tables. I
have VIEW through the 5 tables and 4 JOINs.
first table has 14000 rows, second 42000 rows and others have around
20 rows.
Time of query depends on WHERE condition.
SELECT COUNT(*) FROM v_auto_detail_seller; takes time 1 sec.
SELECT i_auto_id, v_name, f_price, i_year FROM v_auto_detail_seller; takes time 2 sec.
but this time is not good for me. I need time max. around 0,2 sec.
I must do this:
SELECT * INTO t_auto FROM from v_auto_detail_seller;
then queries on t_auto are very fast; But I must provide
reference integrity by triggers.
sometimes I need lock entire database for access, because this:
BEGIN WORK;
DROP t_auto;
SELECT * INTO t_auto FROM from v_auto_detail_seller;
COMMIT WORK;
May I provide exlusive access to database??? Or exists some other
solutions for my problem??? :)
sorry for english... thanx, miso
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2003-11-19 13:55:16 | Re: PostgreSQL v7.4 Released |
Previous Message | Rob Sell | 2003-11-19 13:44:06 | Re: Optimizing query |