MapInfo Index for external database (Postgres) table

92 views
Skip to first unread message

dhruti.p...@gmail.com

unread,
Oct 2, 2023, 12:24:52 PM10/2/23
to MapInfo-L
Hello,

I am struggling with creating or updating index on Postgres database table using Mapinfo. 

First, I saved copy of mapinfo X table as postgres Y table. Then I created index on Y table using pgAdmin 4 but when I opened Y table into mapinfo, there isn't any index for table Y and even I am not able to create it manually as creating index option is disable in mapinfo.

Please help me out. I would like to use the database table index into mapinfo.

I appreciate your time and effort.

Thank you,
Dhruti

Uffe Kousgaard

unread,
Oct 2, 2023, 4:42:07 PM10/2/23
to mapi...@googlegroups.com
Hi,

What makes you think the table index isn't used in MapInfo?
Just run a query which can benefit from the index and time it.
Then go to pgAdmin and make a copy of the table, but remove the the index.
Then back to MapInfo and run a new test on the copy.

I think you will see the benefit of the index.

You can just not add or remove indices from within MapInfo.

Regards
Uffe Kousgaard
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/823df3fc-9218-43eb-bae5-d0706c0d101en%40googlegroups.com.

Peter Horsbøll Møller

unread,
Oct 3, 2023, 1:01:15 AM10/3/23
to mapi...@googlegroups.com

Hi

 

Uffe is right. MapInfo Pro will benefit from the index if you use it right.

 

Unfortunately, there is a big chance you are using it wrong.

That’s because MapInfo Pro won’t by default push any SQL statement executed using the SQL tools in MapInfo Pro down to the database for processing.

 

If you use a Row Filter when you open a table from the database into MapInfo Pro, the query will be sent to the database.

If you use SQL inside MapInfo Pro to query an already open table, the query will run in MapInfo Pro itself.

 

 

When you open a table from a database into MapInfo Pro, you can use either Live or Linked.

 

If you use Live, MapInfo Pro will limit the rows to the current map extent.

Data will be very limited cached and will refresh on every zoom or pan.

I would not recommend using any SQL Select statements on a Live DBMS table.

 

If you use Linked MapInfo Pro will “download” a copy of the DBMS table into a native tab file.

This linked table will still be linked to the DBMS table and you can refresh it and edit the data in the database through it too.

For the linked table you can also create an index on one or more columns to be used by MapInfo Pro.

This is the DBMS table type I would recommend if you want to run queries and analysis on the table inside MapInfo Pro.

 

HTH

Peter

 

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

From: mapi...@googlegroups.com mapi...@googlegroups.com On Behalf Of Uffe Kousgaard
Sent: 2. oktober 2023 22:42
To: mapi...@googlegroups.com
Subject: Re: [MI-L] MapInfo Index for external database (Postgres) table

 

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

 

dhruti.p...@gmail.com

unread,
Oct 5, 2023, 10:28:00 AM10/5/23
to MapInfo-L
Hello Uffe & Peter,

Thank you so much for your help.

My problem has been resolved and now I am able to update the index in Mapinfo for database tables.

I also found another issue with saving geographical objects table as database table. I have table X which contains geo objects and when I do save copy as Y (Postgre DB Table), Mapinfo throws an error "Failed to update the  mapinfo_mapcatalog". I have created mapinfo_mapcatalog table in the same schema where I am trying to save the X table. 

If you have any solution to this problem, that would be appreciated.

Regards,
Dhruti

Peter Horsbøll Møller

unread,
Oct 6, 2023, 1:09:08 AM10/6/23
to mapi...@googlegroups.com

Hi

 

The MapInfo_MapCatalog must be created under the MapInfo/mapinfo schema.

You can use MapInfo EasyLoader to get this created the right way.

 

Cheers

Peter

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

Reply all
Reply to author
Forward
0 new messages