MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MV4a4 some problems



Quoting Holm Tiffe (holm@freibergnet.de):
> ******    message to minivend-users from Holm Tiffe <holm@freibergnet.de>     ******
> 
> Hi,
> 
> I have up and running (so far) the simple demo from MV4a4 with postgresql 6.5.3
> on FreeBSD.
> 
> There are some problems with the DBI/DBD I think,
> 
> The first one is the construct in leftside:
> 
> <TD WIDTH="150" BGCOLOR="#c6a563" VALIGN="top" ALIGN="left"><FONT SIZE="1" FACE=
> "Tahoma, Arial, Helvetica"><BR>
> &nbsp;&nbsp;<A HREF="[if-cat-data cat url][cat-data cat url][else][area href=sca
> n
>         arg=|
>         se=[cat-data cat selector]
>         sf=category
>         ml=3
>         |][/else][/if-cat-data]" ALT="[cat-data cat name]"><B>[cat-data cat name
> ]</B></A><BR>
> </FONT></TD>
> 
> even if I try to set the cat url manually to NULL's, the [area scan] is
> never called.
> 
> I haven't had the time to look deeper on this problem jet...

You will have to, as I don't do Postgres. It works fine with MySQL. But
bear in mind that it is inside a [timed-build ...] tag, so changes will
not show up immediately. Try removing the [timed-build].

> 
> 
> The 2nd one is the automatic generation of indexes in the lib/Vend/Table/DBI.pm
> in sub create around the line 166, Vend wishes to create an index ${key}_idx
> for each table. Since the key for the most tables are called code, postgres
> refuses to create more then one index named code_idx.
> 
> Changing the line
> 
> $db->do("create index ${key}_idx on $tablename ($key)")
>         or ::logError("table %s index failed: %s" , $tablename, $DBI::errstr);
> 
> to something like
> 
> $db->do("create index ${tablename}_${key}_idx on $tablename ($key)")
>         or ::logError("table %s index failed: %s" , $tablename, $DBI::errstr);
> 
> solves this problem since the indexes are now called like products_code_idx.

Good suggestion; I hope I don't run into length restrictions now. I actually
put in

	 $db->do("create index ${tablename}_${key} on $tablename ($key)")

which should make it less likely.

I never intended this table creation code to be used in production,
figuring that people would maintain their own SQL tables, but I guess
it is. ;-)

I still HIGHLY RECOMMEND manual tuning and indexing of databases if 
you are using SQL in production.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
The U.S. Senate -- white            131 Willow Lane, Floor 2  | ||  _ \
male millionaires working           Oxford, OH  45056         | || |_) |
for YOU!                            <mikeh@minivend.com>     |___|  _ <
-- Dave Barry                       513.523.7621 FAX 7501        |_| \_\


Search for: Match: Format: Sort by: